OSDN Git Service

Fixes, and updated guide
authorryan <>
Mon, 26 Dec 2016 04:30:24 +0000 (04:30 +0000)
committerryan <>
Mon, 26 Dec 2016 04:30:24 +0000 (04:30 +0000)
designguide.html
src/sbs/escalator.cpp
src/sbs/escalator.h
src/sbs/floor.cpp
src/sbs/floor.h

index b80694f..0783658 100644 (file)
@@ -1464,6 +1464,25 @@ Leave the sound field blank for no sounds to be played.<br>
 <em>Rotation</em> determines the starting rotation of the door.
 </p>
 
+<p align="left"><strong>14. AddEscalator</strong> - creates an escalator at
+the specified location.<br>
+Syntax: <font face="Courier New, Courier, mono" size="2">AddEscalator <em>name,
+run, speed, sound_file, texture, direction, CenterX, CenterZ, width, risersize,
+treadsize, num_steps, voffset, tw, th</em></font><br>
+Example: <font face="Courier New, Courier, mono" size="2">AddEscalator MyEscalator,
+1, 1, 0.01, , Brick, left, 0, -10, 4, 1, 1, 15, 0, 1, 1</font></p>
+
+<p align="left">The <em>direction</em> parameter specifies the direction the
+escalator faces (where the bottom step is), and so if an escalator goes up from
+left to right, the direction would be <em>left</em>. <em>Width</em> specifies
+the step width; <em>risersize</em> specifies the height of each step riser
+(vertical portion); <em>treadsize</em> specifies the length of each step
+tread/run (horizontal portion); <em>num_stairs</em> specifies the total number
+of steps to create (including the above landing platform, but not including the
+base platform).  <em>Run</em> specifies the run state, where 1 equals forward,
+0 equals stopped, and -1 equals reverse.</p>
+
+
 <p align="left"><strong></strong></p>
 
 <br>
index 5b91167..95d970d 100644 (file)
@@ -34,7 +34,7 @@
 
 namespace SBS {
 
-Escalator::Escalator(Object *parent, const std::string &name, bool run, float speed, const std::string &sound_file, const std::string &texture, const std::string &direction, float CenterX, float CenterZ, float width, float risersize, float treadsize, int num_steps, float voffset, float tw, float th) : Object(parent)
+Escalator::Escalator(Object *parent, const std::string &name, int run, float speed, const std::string &sound_file, const std::string &texture, const std::string &direction, float CenterX, float CenterZ, float width, float risersize, float treadsize, int num_steps, float voffset, float tw, float th) : Object(parent)
 {
        //create a new escalator object
        //run is either 1 for forward motion, -1 for reverse motion, 0 for stop
index c5a5fdd..608f19e 100644 (file)
@@ -34,7 +34,7 @@ public:
        int Run;
        float Speed;
 
-       Escalator(Object *parent, const std::string &name, bool run, float speed, const std::string &sound_file, const std::string &texture, const std::string &direction, float CenterX, float CenterZ, float width, float risersize, float treadsize, int num_steps, float voffset, float tw, float th);
+       Escalator(Object *parent, const std::string &name, int run, float speed, const std::string &sound_file, const std::string &texture, const std::string &direction, float CenterX, float CenterZ, float width, float risersize, float treadsize, int num_steps, float voffset, float tw, float th);
        ~Escalator();
        void Enabled(bool value);
        void Report(const std::string &message);
index 085ae29..585befd 100644 (file)
@@ -1379,7 +1379,7 @@ CameraTexture* Floor::AddCameraTexture(const std::string &name, bool enabled, in
        return cameratexture;
 }
 
-Escalator* Floor::AddEscalator(const std::string &name, bool run, float speed, const std::string &sound_file, const std::string &texture, const std::string &direction, float CenterX, float CenterZ, float width, float risersize, float treadsize, int num_steps, float voffset, float tw, float th)
+Escalator* Floor::AddEscalator(const std::string &name, int run, float speed, const std::string &sound_file, const std::string &texture, const std::string &direction, float CenterX, float CenterZ, float width, float risersize, float treadsize, int num_steps, float voffset, float tw, float th)
 {
        //add an escalator
        Escalator* escalator = new Escalator(this, name, run, speed, sound_file, texture, direction, CenterX, CenterZ, width, risersize, treadsize, num_steps, GetBase(true) + voffset, tw, th);
index b56941a..791d953 100644 (file)
@@ -110,7 +110,7 @@ public:
        Control* AddControl(const std::string &name, const std::string &sound, const std::string &direction, float CenterX, float CenterZ, float width, float height, float voffset, int selection_position, std::vector<std::string> &action_names, std::vector<std::string> &textures);
        Trigger* AddTrigger(const std::string &name, const std::string &sound_file, Ogre::Vector3 &area_min, Ogre::Vector3 &area_max, std::vector<std::string> &action_names);
        CameraTexture* AddCameraTexture(const std::string &name, bool enabled, int quality, float fov, Ogre::Vector3 position, bool use_rotation, Ogre::Vector3 rotation);
-       Escalator* AddEscalator(const std::string &name, bool run, float speed, const std::string &sound_file, const std::string &texture, const std::string &direction, float CenterX, float CenterZ, float width, float risersize, float treadsize, int num_steps, float voffset, float tw, float th);
+       Escalator* AddEscalator(const std::string &name, int run, float speed, const std::string &sound_file, const std::string &texture, const std::string &direction, float CenterX, float CenterZ, float width, float risersize, float treadsize, int num_steps, float voffset, float tw, float th);
        std::vector<Sound*> GetSound(const std::string &name);
        void SetAltitude(float altitude);
        void ShowInfo(bool detailed = true, bool display_header = true);