OSDN Git Service

Renamed WallObject to Wall
authorryan <>
Mon, 21 Nov 2016 00:34:21 +0000 (00:34 +0000)
committerryan <>
Mon, 21 Nov 2016 00:34:21 +0000 (00:34 +0000)
22 files changed:
src/frontend/script_commands.cpp
src/frontend/scriptprocessor.h
src/sbs/camera.cpp
src/sbs/control.cpp
src/sbs/door.cpp
src/sbs/elevatorcar.cpp
src/sbs/elevatorcar.h
src/sbs/elevatordoor.cpp
src/sbs/escalator.cpp
src/sbs/floor.cpp
src/sbs/floor.h
src/sbs/mesh.cpp
src/sbs/mesh.h
src/sbs/revolvingdoor.cpp
src/sbs/sbs.cpp
src/sbs/sbs.h
src/sbs/shaft.cpp
src/sbs/shaft.h
src/sbs/stairs.cpp
src/sbs/stairs.h
src/sbs/wall.cpp
src/sbs/wall.h

index 8e0b173..ac603bd 100644 (file)
@@ -560,7 +560,7 @@ int ScriptProcessor::CommandsSection::Run(std::string &LineData)
                if (!mesh)
                        return ScriptError("Invalid mesh object");
 
-               WallObject *wall = mesh->GetWallByName(tempdata[1]);
+               Wall *wall = mesh->GetWallByName(tempdata[1]);
 
                if (!wall)
                        return ScriptError("Invalid wall object");
index f355d94..07dbcd4 100644 (file)
@@ -102,7 +102,7 @@ private:
                std::vector<std::string> Params;
        };
 
-       SBS::WallObject *wall;
+       SBS::Wall *wall;
        int startpos;
        std::vector<std::string> BuildingData;
        std::vector<std::string> BuildingDataOrig;
index e97cb86..9b25741 100644 (file)
@@ -551,7 +551,7 @@ void Camera::ClickedObject(bool shift, bool ctrl, bool alt, bool right)
        ray.setDirection(sbs->GetOrientation().Inverse() * ray.getDirection());
 
        MeshObject* mesh = 0;
-       WallObject* wall = 0;
+       Wall* wall = 0;
 
        bool hit = sbs->HitBeam(ray, 1000.0f, mesh, wall, HitPosition);
 
@@ -1161,7 +1161,7 @@ bool Camera::PickUpModel()
 
        Ogre::Vector3 hit_position;
        MeshObject *mesh = 0;
-       WallObject *wall = 0;
+       Wall *wall = 0;
        bool hit = false;
 
        //do a raycast from the collider's position, in the forward direction
index 2e86ec7..e2ab5e3 100644 (file)
@@ -71,7 +71,7 @@ Control::Control(Object *parent, const std::string &name, bool permanent, const
        std::string texture = GetTexture(selection_position);
 
        sbs->TexelOverride = true;
-       WallObject *wall;
+       Wall *wall;
        if (Direction == "front")
        {
                float x = 0, y = width;
index 1790dc2..1688b4d 100644 (file)
@@ -133,7 +133,7 @@ Door::Door(Object *parent, DynamicMesh *wrapper, const std::string &name, const
        if (Direction == 3 || Direction == 4 || Direction == 7 || Direction == 8)
                sbs->GetTextureManager()->SetTextureFlip(1, 0, 0, 0, 0, 0); //flip texture on rear side of door
 
-       WallObject *wall;
+       Wall *wall;
        wall = DoorMesh->CreateWallObject(name);
        sbs->AddWallMain(wall, name, texture, thickness, x1, z1, x2, z2, height, height, 0, 0, tw, th, false);
        sbs->ResetWalls();
index d02e9ee..b8992d0 100644 (file)
@@ -411,20 +411,20 @@ bool ElevatorCar::ReportError(const std::string &message)
        return parent->ReportError(message);
 }
 
-WallObject* ElevatorCar::AddWall(const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height1, float height2, float voffset1, float voffset2, float tw, float th)
+Wall* ElevatorCar::AddWall(const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height1, float height2, float voffset1, float voffset2, float tw, float th)
 {
        //Adds a wall with the specified dimensions
 
-       WallObject *wall = Mesh->CreateWallObject(name);
+       Wall *wall = Mesh->CreateWallObject(name);
        sbs->AddWallMain(wall, name, texture, thickness, x1, z1, x2, z2, height1, height2, voffset1, voffset2, tw, th, true);
        return wall;
 }
 
-WallObject* ElevatorCar::AddFloor(const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float voffset1, float voffset2, bool reverse_axis, bool texture_direction, float tw, float th, bool legacy_behavior)
+Wall* ElevatorCar::AddFloor(const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float voffset1, float voffset2, bool reverse_axis, bool texture_direction, float tw, float th, bool legacy_behavior)
 {
        //Adds a floor with the specified dimensions and vertical offset
 
-       WallObject *wall = Mesh->CreateWallObject(name);
+       Wall *wall = Mesh->CreateWallObject(name);
        sbs->AddFloorMain(wall, name, texture, thickness, x1, z1, x2, z2, voffset1, voffset2, reverse_axis, texture_direction, tw, th, true, legacy_behavior);
        return wall;
 }
index 6cb21ef..5da522a 100644 (file)
@@ -83,8 +83,8 @@ public:
        Elevator* GetElevator();
        void Report(const std::string &message);
        bool ReportError(const std::string &message);
-       WallObject* AddWall(const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height1, float height2, float voffset1, float voffset2, float tw, float th);
-       WallObject* AddFloor(const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float voffset1, float voffset2, bool reverse_axis, bool texture_direction, float tw, float th, bool legacy_behavior = false);
+       Wall* AddWall(const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height1, float height2, float voffset1, float voffset2, float tw, float th);
+       Wall* AddFloor(const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float voffset1, float voffset2, bool reverse_axis, bool texture_direction, float tw, float th, bool legacy_behavior = false);
        FloorIndicator* AddFloorIndicator(const std::string &texture_prefix, const std::string &direction, float CenterX, float CenterZ, float width, float height, float voffset);
        ButtonPanel* CreateButtonPanel(const std::string &texture, int rows, int columns, const std::string &direction, float CenterX, float CenterZ, float width, float height, float voffset, float spacingX, float spacingY, float tw, float th);
        void DumpServicedFloors();
index 0f7975d..768ee18 100644 (file)
@@ -808,7 +808,7 @@ ElevatorDoor::DoorObject* ElevatorDoor::AddDoorComponent(DoorWrapper *wrapper, c
 
        //add main walls
        sbs->DrawWalls(true, true, false, false, false, false);
-       WallObject *wall;
+       Wall *wall;
        wall = door->mesh->CreateWallObject(name);
        sbs->AddWallMain(wall, name, texture, thickness, x1, z1, x2, z2, height, height, voffset, voffset, tw, th, false);
        sbs->ResetWalls();
index 7dd30f2..0e47e7d 100644 (file)
@@ -174,7 +174,7 @@ void Escalator::CreateSteps(const std::string &texture, const std::string &direc
                std::string buffer;
 
                //create wall object
-               WallObject *wall = Steps[i]->CreateWallObject(base);
+               Wall *wall = Steps[i]->CreateWallObject(base);
 
                float thickness = 0;
                if (i < num_steps - 1)
index 98c1642..4ca344d 100644 (file)
@@ -264,11 +264,11 @@ Floor::~Floor()
                sbs->RemoveFloor(this);
 }
 
-WallObject* Floor::AddFloor(const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float voffset1, float voffset2, bool reverse_axis, bool texture_direction, float tw, float th, bool isexternal, bool legacy_behavior)
+Wall* Floor::AddFloor(const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float voffset1, float voffset2, bool reverse_axis, bool texture_direction, float tw, float th, bool isexternal, bool legacy_behavior)
 {
        //Adds a floor with the specified dimensions and vertical offset
 
-       WallObject *wall;
+       Wall *wall;
 
        if (isexternal == false)
        {
@@ -283,20 +283,20 @@ WallObject* Floor::AddFloor(const std::string &name, const std::string &texture,
        return wall;
 }
 
-WallObject* Floor::AddInterfloorFloor(const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float voffset1, float voffset2, bool reverse_axis, bool texture_direction, float tw, float th, bool legacy_behavior)
+Wall* Floor::AddInterfloorFloor(const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float voffset1, float voffset2, bool reverse_axis, bool texture_direction, float tw, float th, bool legacy_behavior)
 {
        //Adds an interfloor floor with the specified dimensions and vertical offset
 
-       WallObject *wall = Interfloor->CreateWallObject(name);
+       Wall *wall = Interfloor->CreateWallObject(name);
        sbs->AddFloorMain(wall, name, texture, thickness, x1, z1, x2, z2, voffset1, voffset2, reverse_axis, texture_direction, tw, th, true, legacy_behavior);
        return wall;
 }
 
-WallObject* Floor::AddWall(const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height_in1, float height_in2, float voffset1, float voffset2, float tw, float th, bool isexternal)
+Wall* Floor::AddWall(const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height_in1, float height_in2, float voffset1, float voffset2, float tw, float th, bool isexternal)
 {
        //Adds a wall with the specified dimensions
 
-       WallObject *wall;
+       Wall *wall;
        if (isexternal == false)
        {
                wall = Level->CreateWallObject(name);
@@ -310,11 +310,11 @@ WallObject* Floor::AddWall(const std::string &name, const std::string &texture,
        return wall;
 }
 
-WallObject* Floor::AddInterfloorWall(const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height_in1, float height_in2, float voffset1, float voffset2, float tw, float th)
+Wall* Floor::AddInterfloorWall(const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height_in1, float height_in2, float voffset1, float voffset2, float tw, float th)
 {
        //Adds an interfloor wall with the specified dimensions
 
-       WallObject *wall = Interfloor->CreateWallObject(name);
+       Wall *wall = Interfloor->CreateWallObject(name);
        sbs->AddWallMain(wall, name, texture, thickness, x1, z1, x2, z2, height_in1, height_in2, voffset1, voffset2, tw, th, true);
        return wall;
 }
@@ -758,14 +758,14 @@ void Floor::EnableInterfloor(bool value)
        IsInterfloorEnabled = value;
 }
 
-WallObject* Floor::ColumnWallBox(const std::string &name, const std::string &texture, float x1, float x2, float z1, float z2, float height_in, float voffset, float tw, float th, bool inside, bool outside, bool top, bool bottom)
+Wall* Floor::ColumnWallBox(const std::string &name, const std::string &texture, float x1, float x2, float z1, float z2, float height_in, float voffset, float tw, float th, bool inside, bool outside, bool top, bool bottom)
 {
        //create columnframe wall box
 
        return sbs->CreateWallBox(ColumnFrame, name, texture, x1, x2, z1, z2, height_in, voffset, tw, th, inside, outside, top, bottom, true);
 }
 
-WallObject* Floor::ColumnWallBox2(const std::string &name, const std::string &texture, float CenterX, float CenterZ, float WidthX, float LengthZ, float height_in, float voffset, float tw, float th, bool inside, bool outside, bool top, bool bottom)
+Wall* Floor::ColumnWallBox2(const std::string &name, const std::string &texture, float CenterX, float CenterZ, float WidthX, float LengthZ, float height_in, float voffset, float tw, float th, bool inside, bool outside, bool top, bool bottom)
 {
        //create columnframe wall box from a central location
 
index 6014daa..4c032f0 100644 (file)
@@ -57,10 +57,10 @@ public:
        //functions
        Floor(Object *parent, FloorManager *manager, int number);
        ~Floor();
-       WallObject* AddFloor(const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float voffset1, float voffset2, bool reverse_axis, bool texture_direction, float tw, float th, bool isexternal, bool legacy_behavior = false);
-       WallObject* AddInterfloorFloor(const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float voffset1, float voffset2, bool reverse_axis, bool texture_direction, float tw, float th, bool legacy_behavior = false);
-       WallObject* AddWall(const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height_in1, float height_in2, float voffset1, float voffset2, float tw, float th, bool isexternal);
-       WallObject* AddInterfloorWall(const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height_in1, float height_in2, float voffset1, float voffset2, float tw, float th);
+       Wall* AddFloor(const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float voffset1, float voffset2, bool reverse_axis, bool texture_direction, float tw, float th, bool isexternal, bool legacy_behavior = false);
+       Wall* AddInterfloorFloor(const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float voffset1, float voffset2, bool reverse_axis, bool texture_direction, float tw, float th, bool legacy_behavior = false);
+       Wall* AddWall(const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height_in1, float height_in2, float voffset1, float voffset2, float tw, float th, bool isexternal);
+       Wall* AddInterfloorWall(const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height_in1, float height_in2, float voffset1, float voffset2, float tw, float th);
        void Enabled(bool value);
        float FullHeight();
        CallButton* AddCallButtons(std::vector<int> &elevators, const std::string &sound_file, const std::string &BackTexture, const std::string &UpButtonTexture, const std::string &UpButtonTexture_Lit, const std::string &DownButtonTexture, const std::string &DownButtonTexture_Lit, float CenterX, float CenterZ, float voffset, const std::string &direction, float BackWidth, float BackHeight, bool ShowBack, float tw, float th);
@@ -74,8 +74,8 @@ public:
        bool CalculateAltitude();
        void EnableColumnFrame(bool value);
        void EnableInterfloor(bool value);
-       WallObject* ColumnWallBox(const std::string &name, const std::string &texture, float x1, float x2, float z1, float z2, float height_in, float voffset, float tw, float th, bool inside, bool outside, bool top, bool bottom);
-       WallObject* ColumnWallBox2(const std::string &name, const std::string &texture, float CenterX, float CenterZ, float WidthX, float LengthZ, float height_in, float voffset, float tw, float th, bool inside, bool outside, bool top, bool bottom);
+       Wall* ColumnWallBox(const std::string &name, const std::string &texture, float x1, float x2, float z1, float z2, float height_in, float voffset, float tw, float th, bool inside, bool outside, bool top, bool bottom);
+       Wall* ColumnWallBox2(const std::string &name, const std::string &texture, float CenterX, float CenterZ, float WidthX, float LengthZ, float height_in, float voffset, float tw, float th, bool inside, bool outside, bool top, bool bottom);
        FloorIndicator* AddFloorIndicator(int elevator, int car, bool relative, const std::string &texture_prefix, const std::string &direction, float CenterX, float CenterZ, float width, float height, float voffset);
        void UpdateFloorIndicators(int elevator);
        void UpdateFloorIndicators();
index 2f7ed4a..e39624c 100644 (file)
@@ -94,7 +94,7 @@ Ogre::Vector2 SBS::GetExtents(std::vector<Ogre::Vector3> &varray, int coord, boo
        return Ogre::Vector2(esmall, ebig);
 }
 
-void SBS::Cut(WallObject *wall, Ogre::Vector3 start, Ogre::Vector3 end, bool cutwalls, bool cutfloors, int checkwallnumber, bool reset_check)
+void SBS::Cut(Wall *wall, Ogre::Vector3 start, Ogre::Vector3 end, bool cutwalls, bool cutfloors, int checkwallnumber, bool reset_check)
 {
        //cuts a rectangular hole in the polygons within the specified range
 
@@ -699,18 +699,18 @@ void MeshObject::EnableCollider(bool value)
        sbs->camera->ResetCollisions();
 }
 
-WallObject* MeshObject::CreateWallObject(const std::string &name)
+Wall* MeshObject::CreateWallObject(const std::string &name)
 {
        //create a new wall object in the given array
 
-       WallObject *wall = new WallObject(this);
+       Wall *wall = new Wall(this);
        wall->SetParentArray(Walls);
        wall->SetValues("Wall", name, false, false);
        Walls.push_back(wall);
        return wall;
 }
 
-WallObject* MeshObject::GetWallByName(std::string name)
+Wall* MeshObject::GetWallByName(std::string name)
 {
        //find a wall object by name
 
@@ -781,7 +781,7 @@ bool MeshObject::ReplaceTexture(const std::string &oldtexture, const std::string
        return result;
 }
 
-WallObject* MeshObject::FindWallIntersect(const Ogre::Vector3 &start, const Ogre::Vector3 &end, Ogre::Vector3 &isect, float &distance, Ogre::Vector3 &normal, WallObject *wall)
+Wall* MeshObject::FindWallIntersect(const Ogre::Vector3 &start, const Ogre::Vector3 &end, Ogre::Vector3 &isect, float &distance, Ogre::Vector3 &normal, Wall *wall)
 {
        //find a wall from a 3D point
        //positions need to be in remote (Ogre) positioning
@@ -1735,7 +1735,7 @@ void MeshObject::DeleteWalls()
 
        for (size_t i = 0; i < Walls.size(); i++)
        {
-               WallObject *wall = Walls[i];
+               Wall *wall = Walls[i];
                if (wall)
                {
                        wall->parent_deleting = true;
@@ -1751,7 +1751,7 @@ void MeshObject::DeleteWalls(Object *parent)
 
        for (size_t i = 0; i < Walls.size(); i++)
        {
-               WallObject *wall = Walls[i];
+               Wall *wall = Walls[i];
                if (wall)
                {
                        if (wall->GetParent() == parent)
@@ -1771,7 +1771,7 @@ Ogre::Vector3 MeshObject::GetPoint(const std::string &wallname, const Ogre::Vect
        //do a line intersection with a specified wall associated with this mesh object,
        //and return the intersection point
 
-       WallObject *wall = GetWallByName(wallname);
+       Wall *wall = GetWallByName(wallname);
 
        if (wall)
                return wall->GetPoint(start, end);
@@ -1783,7 +1783,7 @@ Ogre::Vector3 MeshObject::GetWallExtents(const std::string &name, float altitude
 {
        //return the X and Z extents of a standard wall (by name) at a specific altitude, by doing a double plane cut
 
-       WallObject *wall = GetWallByName(name);
+       Wall *wall = GetWallByName(name);
 
        if (wall)
                return wall->GetWallExtents(altitude, get_max);
@@ -1841,7 +1841,7 @@ Ogre::Vector2 MeshObject::GetExtents(int coord, bool flip_z)
        return Ogre::Vector2(esmall, ebig);
 }
 
-WallObject* MeshObject::FindPolygon(const std::string &name, int &index)
+Wall* MeshObject::FindPolygon(const std::string &name, int &index)
 {
        //finds a polygon by name in all associated wall objects
        //returns associated wall object and polygon index
index 5aaa9b9..86f9489 100644 (file)
@@ -75,11 +75,11 @@ public:
        void Enable(bool value);
        void EnableCollider(bool value);
        bool IsEnabled();
-       WallObject* CreateWallObject(const std::string &name);
-       WallObject* GetWallByName(std::string name);
+       Wall* CreateWallObject(const std::string &name);
+       Wall* GetWallByName(std::string name);
        bool ChangeTexture(const std::string &texture, bool matcheck = true, int submesh = 0);
        bool ReplaceTexture(const std::string &oldtexture, const std::string &newtexture);
-       WallObject* FindWallIntersect(const Ogre::Vector3 &start, const Ogre::Vector3 &end, Ogre::Vector3 &isect, float &distance, Ogre::Vector3 &normal, WallObject *wall = 0);
+       Wall* FindWallIntersect(const Ogre::Vector3 &start, const Ogre::Vector3 &end, Ogre::Vector3 &isect, float &distance, Ogre::Vector3 &normal, Wall *wall = 0);
        bool PolyMesh(const std::string &name, const std::string &texture, std::vector<Ogre::Vector3> &vertices, float tw, float th, bool autosize, Ogre::Matrix3 &tex_matrix, Ogre::Vector3 &tex_vector, std::vector<Extents> &mesh_indices, std::vector<Triangle> &triangles, std::vector<std::vector<Ogre::Vector3> > &converted_vertices);
        bool PolyMesh(const std::string &name, const std::string &material, std::vector<std::vector<Ogre::Vector3> > &vertices, Ogre::Matrix3 &tex_matrix, Ogre::Vector3 &tex_vector, std::vector<Extents> &mesh_indices, std::vector<Triangle> &triangles, std::vector<std::vector<Ogre::Vector3> > &converted_vertices, float tw, float th, bool convert_vertices = true);
        Ogre::Vector2* GetTexels(Ogre::Matrix3 &tex_matrix, Ogre::Vector3 &tex_vector, std::vector<std::vector<Ogre::Vector3> > &vertices, float tw, float th);
@@ -100,7 +100,7 @@ public:
        Ogre::Vector3 GetPoint(const std::string &wallname, const Ogre::Vector3 &start, const Ogre::Vector3 &end);
        Ogre::Vector3 GetWallExtents(const std::string &name, float altitude, bool get_max);
        Ogre::Vector2 GetExtents(int coord, bool flip_z = false);
-       WallObject* FindPolygon(const std::string &name, int &index);
+       Wall* FindPolygon(const std::string &name, int &index);
        void OnMove(bool parent);
        void OnRotate(bool parent);
        int GetSubmeshCount();
@@ -115,7 +115,7 @@ public:
 
        DynamicMesh *MeshWrapper; //dynamic mesh this mesh object uses
        std::vector<SubMesh> Submeshes; //submeshes
-       std::vector<WallObject*> Walls; //associated wall (polygon container) objects
+       std::vector<Wall*> Walls; //associated wall (polygon container) objects
 
        SceneNode *collider_node; //collider scenenode for box collider offsets
 
index 2908a9d..2259b28 100644 (file)
@@ -76,7 +76,7 @@ RevolvingDoor::RevolvingDoor(Object *parent, DynamicMesh *wrapper, const std::st
        sbs->DrawWalls(true, true, true, true, true, true);
        sbs->GetTextureManager()->ResetTextureMapping(true);
 
-       WallObject *wall;
+       Wall *wall;
        wall = DoorMesh->CreateWallObject(name);
 
        Segments = segments;
index fc1ab8e..9fdf121 100644 (file)
@@ -614,13 +614,13 @@ void SBS::CalculateFrameRate()
 
 bool SBS::AddWallMain(Object *parent, MeshObject* mesh, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height_in1, float height_in2, float altitude1, float altitude2, float tw, float th, bool autosize)
 {
-       WallObject *object = new WallObject(mesh, parent, true);
+       Wall *object = new Wall(mesh, parent, true);
        bool result = AddWallMain(object, name, texture, thickness, x1, z1, x2, z2, height_in1, height_in2, altitude1, altitude2, tw, th, autosize);
        delete object;
        return result;
 }
 
-bool SBS::AddWallMain(WallObject* wallobject, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height_in1, float height_in2, float altitude1, float altitude2, float tw, float th, bool autosize)
+bool SBS::AddWallMain(Wall* wallobject, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height_in1, float height_in2, float altitude1, float altitude2, float tw, float th, bool autosize)
 {
        //Adds a wall with the specified dimensions
 
@@ -853,13 +853,13 @@ bool SBS::AddWallMain(WallObject* wallobject, const std::string &name, const std
 
 bool SBS::AddFloorMain(Object *parent, MeshObject* mesh, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float altitude1, float altitude2, bool reverse_axis, bool texture_direction, float tw, float th, bool autosize, bool legacy_behavior)
 {
-       WallObject *object = new WallObject(mesh, parent, true);
+       Wall *object = new Wall(mesh, parent, true);
        bool result = AddFloorMain(object, name, texture, thickness, x1, z1, x2, z2, altitude1, altitude2, reverse_axis, texture_direction, tw, th, autosize, legacy_behavior);
        delete object;
        return result;
 }
 
-bool SBS::AddFloorMain(WallObject* wallobject, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float altitude1, float altitude2, bool reverse_axis, bool texture_direction, float tw, float th, bool autosize, bool legacy_behavior)
+bool SBS::AddFloorMain(Wall* wallobject, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float altitude1, float altitude2, bool reverse_axis, bool texture_direction, float tw, float th, bool autosize, bool legacy_behavior)
 {
        //Adds a floor with the specified dimensions and vertical offset
 
@@ -1113,7 +1113,7 @@ bool SBS::ReportError(const std::string &message)
        return false;
 }
 
-WallObject* SBS::CreateWallBox(MeshObject* mesh, const std::string &name, const std::string &texture, float x1, float x2, float z1, float z2, float height_in, float voffset, float tw, float th, bool inside, bool outside, bool top, bool bottom, bool autosize)
+Wall* SBS::CreateWallBox(MeshObject* mesh, const std::string &name, const std::string &texture, float x1, float x2, float z1, float z2, float height_in, float voffset, float tw, float th, bool inside, bool outside, bool top, bool bottom, bool autosize)
 {
        //create 4 walls
 
@@ -1128,7 +1128,7 @@ WallObject* SBS::CreateWallBox(MeshObject* mesh, const std::string &name, const
        }
 
        //create wall object
-       WallObject *wall = mesh->CreateWallObject(name);
+       Wall *wall = mesh->CreateWallObject(name);
 
        bool x_thickness = false, z_thickness = false;
        std::string NewName, texture2 = texture;
@@ -1320,7 +1320,7 @@ WallObject* SBS::CreateWallBox(MeshObject* mesh, const std::string &name, const
        return wall;
 }
 
-WallObject* SBS::CreateWallBox2(MeshObject* mesh, const std::string &name, const std::string &texture, float CenterX, float CenterZ, float WidthX, float LengthZ, float height_in, float voffset, float tw, float th, bool inside, bool outside, bool top, bool bottom, bool autosize)
+Wall* SBS::CreateWallBox2(MeshObject* mesh, const std::string &name, const std::string &texture, float CenterX, float CenterZ, float WidthX, float LengthZ, float height_in, float voffset, float tw, float th, bool inside, bool outside, bool top, bool bottom, bool autosize)
 {
        //create 4 walls from a central point
 
@@ -1332,7 +1332,7 @@ WallObject* SBS::CreateWallBox2(MeshObject* mesh, const std::string &name, const
        return CreateWallBox(mesh, name, texture, x1, x2, z1, z2, height_in, voffset, tw, th, inside, outside, top, bottom, autosize);
 }
 
-void SBS::AddPolygon(WallObject* wallobject, const std::string &texture, std::vector<Ogre::Vector3> &varray, float tw, float th)
+void SBS::AddPolygon(Wall* wallobject, const std::string &texture, std::vector<Ogre::Vector3> &varray, float tw, float th)
 {
        //creates a polygon in the specified wall object
 
@@ -1384,7 +1384,7 @@ void SBS::AddPolygon(WallObject* wallobject, const std::string &texture, std::ve
        }
 }
 
-WallObject* SBS::AddCustomWall(MeshObject* mesh, const std::string &name, const std::string &texture, std::vector<Ogre::Vector3> &varray, float tw, float th)
+Wall* SBS::AddCustomWall(MeshObject* mesh, const std::string &name, const std::string &texture, std::vector<Ogre::Vector3> &varray, float tw, float th)
 {
        //Adds a wall from a specified array of 3D vectors
 
@@ -1392,7 +1392,7 @@ WallObject* SBS::AddCustomWall(MeshObject* mesh, const std::string &name, const
                return 0;
 
        //create wall object
-       WallObject *wall = mesh->CreateWallObject(name);
+       Wall *wall = mesh->CreateWallObject(name);
 
        //create polygon in wall object
        AddPolygon(wall, texture, varray, tw, th);
@@ -1400,7 +1400,7 @@ WallObject* SBS::AddCustomWall(MeshObject* mesh, const std::string &name, const
        return wall;
 }
 
-WallObject* SBS::AddCustomFloor(MeshObject* mesh, const std::string &name, const std::string &texture, std::vector<Ogre::Vector2> &varray, float altitude, float tw, float th)
+Wall* SBS::AddCustomFloor(MeshObject* mesh, const std::string &name, const std::string &texture, std::vector<Ogre::Vector2> &varray, float altitude, float tw, float th)
 {
        //Same as AddCustomWall, with only one altitude value value
        std::vector<Ogre::Vector3> varray3;
@@ -1416,7 +1416,7 @@ WallObject* SBS::AddCustomFloor(MeshObject* mesh, const std::string &name, const
        return AddCustomWall(mesh, name, texture, varray3, tw, th);
 }
 
-WallObject* SBS::AddTriangleWall(MeshObject* mesh, const std::string &name, const std::string &texture, float x1, float y1, float z1, float x2, float y2, float z2, float x3, float y3, float z3, float tw, float th)
+Wall* SBS::AddTriangleWall(MeshObject* mesh, const std::string &name, const std::string &texture, float x1, float y1, float z1, float x2, float y2, float z2, float x3, float y3, float z3, float tw, float th)
 {
        //Adds a triangular wall with the specified dimensions
        std::vector<Ogre::Vector3> varray;
@@ -1490,7 +1490,7 @@ void SBS::CreateSky()
        //create a skybox that extends by default 30 miles (30 * 5280 ft) in each direction
        float skysize = GetConfigInt("Skyscraper.SBS.HorizonDistance", 30) * 5280.0f;
        texturemanager->ResetTextureMapping(true);
-       WallObject *wall = new WallObject(SkyBox, SkyBox, true);
+       Wall *wall = new Wall(SkyBox, SkyBox, true);
 
        wall->AddQuad( //front
                "SkyFront",
@@ -1811,7 +1811,7 @@ float SBS::FeetToMeters(float feet)
        return feet / 3.2808399f;
 }
 
-WallObject* SBS::AddDoorwayWalls(MeshObject* mesh, const std::string &wallname, const std::string &texture, float tw, float th)
+Wall* SBS::AddDoorwayWalls(MeshObject* mesh, const std::string &wallname, const std::string &texture, float tw, float th)
 {
        //add joining doorway polygons if needed
 
@@ -1820,7 +1820,7 @@ WallObject* SBS::AddDoorwayWalls(MeshObject* mesh, const std::string &wallname,
 
        if (wall1a == true && wall2a == true)
        {
-               WallObject *wall = mesh->CreateWallObject(wallname);
+               Wall *wall = mesh->CreateWallObject(wallname);
 
                //convert extents to relative positioning
                Ogre::Vector2 extents_x = wall_extents_x - wall->GetMesh()->GetPosition().x;
@@ -1866,33 +1866,33 @@ void SBS::ResetDoorwayWalls()
        wall_extents_z = 0;
 }
 
-WallObject* SBS::AddWall(MeshObject* mesh, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height_in1, float height_in2, float altitude1, float altitude2, float tw, float th)
+Wall* SBS::AddWall(MeshObject* mesh, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height_in1, float height_in2, float altitude1, float altitude2, float tw, float th)
 {
        //Adds a wall with the specified dimensions, to the specified mesh object
 
        if (!mesh)
                return 0;
 
-       WallObject *wall = mesh->CreateWallObject(name);
+       Wall *wall = mesh->CreateWallObject(name);
 
        AddWallMain(wall, name, texture, thickness, x1, z1, x2, z2, height_in1, height_in2, altitude1, altitude2, tw, th, true);
        return wall;
 }
 
-WallObject* SBS::AddFloor(MeshObject* mesh, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float altitude1, float altitude2, bool reverse_axis, bool texture_direction, float tw, float th, bool legacy_behavior)
+Wall* SBS::AddFloor(MeshObject* mesh, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float altitude1, float altitude2, bool reverse_axis, bool texture_direction, float tw, float th, bool legacy_behavior)
 {
        //Adds a floor with the specified dimensions and vertical offset, to the specified mesh object
 
        if (!mesh)
                return 0;
 
-       WallObject *wall = mesh->CreateWallObject(name);
+       Wall *wall = mesh->CreateWallObject(name);
 
        AddFloorMain(wall, name, texture, thickness, x1, z1, x2, z2, altitude1, altitude2, reverse_axis, texture_direction, tw, th, true, legacy_behavior);
        return wall;
 }
 
-WallObject* SBS::AddGround(const std::string &name, const std::string &texture, float x1, float z1, float x2, float z2, float altitude, int tile_x, int tile_z)
+Wall* SBS::AddGround(const std::string &name, const std::string &texture, float x1, float z1, float x2, float z2, float altitude, int tile_x, int tile_z)
 {
        //Adds ground based on a tiled-floor layout, with the specified dimensions and vertical offset
        //this does not support thickness
@@ -1923,7 +1923,7 @@ WallObject* SBS::AddGround(const std::string &name, const std::string &texture,
                maxz = z1;
        }
 
-       WallObject *wall = Landscape->CreateWallObject(name);
+       Wall *wall = Landscape->CreateWallObject(name);
 
        Report("Creating ground...");
 
@@ -2586,7 +2586,7 @@ bool SBS::DeleteObject(Object *object)
                deleted = true;
        else if (type == "Wall")
        {
-               WallObject *obj = static_cast<WallObject*>(object);
+               Wall *obj = static_cast<Wall*>(object);
                obj->DeletePolygons(true);
                deleted = true;
        }
@@ -3600,7 +3600,7 @@ void SBS::DecrementEscalatorCount()
        EscalatorCount--;
 }
 
-bool SBS::HitBeam(const Ogre::Ray &ray, float max_distance, MeshObject *&mesh, WallObject *&wall, Ogre::Vector3 &hit_position)
+bool SBS::HitBeam(const Ogre::Ray &ray, float max_distance, MeshObject *&mesh, Wall *&wall, Ogre::Vector3 &hit_position)
 {
        //use a given ray and distance, and return the nearest hit mesh and if applicable, wall object
        //note that the ray's origin and direction need to be in engine-relative values
index a22391c..9f383e6 100644 (file)
@@ -70,7 +70,7 @@ namespace SBS {
        class RevolvingDoorManager;
        class Polygon;
        class Model;
-       class WallObject;
+       class Wall;
        class Door;
        class Floor;
        class Elevator;
@@ -189,18 +189,18 @@ public:
        void Initialize();
        bool Start(Ogre::Camera *camera = 0);
        void CreateSky();
-       bool AddWallMain(WallObject* wallobject, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height_in1, float height_in2, float altitude1, float altitude2, float tw, float th, bool autosize);
+       bool AddWallMain(Wall* wallobject, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height_in1, float height_in2, float altitude1, float altitude2, float tw, float th, bool autosize);
        bool AddWallMain(Object *parent, MeshObject* mesh, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height_in1, float height_in2, float altitude1, float altitude2, float tw, float th, bool autosize);
-       bool AddFloorMain(WallObject* wallobject, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float altitude1, float altitude2, bool reverse_axis, bool texture_direction, float tw, float th, bool autosize, bool legacy_behavior = false);
+       bool AddFloorMain(Wall* wallobject, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float altitude1, float altitude2, bool reverse_axis, bool texture_direction, float tw, float th, bool autosize, bool legacy_behavior = false);
        bool AddFloorMain(Object *parent, MeshObject* mesh, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float altitude1, float altitude2, bool reverse_axis, bool texture_direction, float tw, float th, bool autosize, bool legacy_behavior = false);
        void CalculateFrameRate();
        void Loop();
-       WallObject* CreateWallBox(MeshObject* mesh, const std::string &name, const std::string &texture, float x1, float x2, float z1, float z2, float height_in, float voffset, float tw, float th, bool inside = true, bool outside = true, bool top = true, bool bottom = true, bool autosize = true);
-       WallObject* CreateWallBox2(MeshObject* mesh, const std::string &name, const std::string &texture, float CenterX, float CenterZ, float WidthX, float LengthZ, float height_in, float voffset, float tw, float th, bool inside = true, bool outside = true, bool top = true, bool bottom = true, bool autosize = true);
-       WallObject* AddTriangleWall(MeshObject* mesh, const std::string &name, const std::string &texture, float x1, float y1, float z1, float x2, float y2, float z2, float x3, float y3, float z3, float tw, float th);
-       WallObject* AddCustomWall(MeshObject* mesh, const std::string &name, const std::string &texture, std::vector<Ogre::Vector3> &varray, float tw, float th);
-       WallObject* AddCustomFloor(MeshObject* mesh, const std::string &name, const std::string &texture, std::vector<Ogre::Vector2> &varray, float altitude, float tw, float th);
-       void AddPolygon(WallObject* wallobject, const std::string &texture, std::vector<Ogre::Vector3> &varray, float tw, float th);
+       Wall* CreateWallBox(MeshObject* mesh, const std::string &name, const std::string &texture, float x1, float x2, float z1, float z2, float height_in, float voffset, float tw, float th, bool inside = true, bool outside = true, bool top = true, bool bottom = true, bool autosize = true);
+       Wall* CreateWallBox2(MeshObject* mesh, const std::string &name, const std::string &texture, float CenterX, float CenterZ, float WidthX, float LengthZ, float height_in, float voffset, float tw, float th, bool inside = true, bool outside = true, bool top = true, bool bottom = true, bool autosize = true);
+       Wall* AddTriangleWall(MeshObject* mesh, const std::string &name, const std::string &texture, float x1, float y1, float z1, float x2, float y2, float z2, float x3, float y3, float z3, float tw, float th);
+       Wall* AddCustomWall(MeshObject* mesh, const std::string &name, const std::string &texture, std::vector<Ogre::Vector3> &varray, float tw, float th);
+       Wall* AddCustomFloor(MeshObject* mesh, const std::string &name, const std::string &texture, std::vector<Ogre::Vector2> &varray, float altitude, float tw, float th);
+       void AddPolygon(Wall* wallobject, const std::string &texture, std::vector<Ogre::Vector3> &varray, float tw, float th);
        void EnableBuildings(bool value);
        void EnableLandscape(bool value);
        void EnableExternal(bool value);
@@ -228,10 +228,10 @@ public:
        int GetDrawWallsCount();
        float MetersToFeet(float meters); //converts meters to feet
        float FeetToMeters(float feet); //converts feet to meters
-       WallObject* AddDoorwayWalls(MeshObject* mesh, const std::string &wallname, const std::string &texture, float tw, float th);
-       WallObject* AddWall(MeshObject* mesh, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height_in1, float height_in2, float altitude1, float altitude2, float tw, float th);
-       WallObject* AddFloor(MeshObject* mesh, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float altitude1, float altitude2, bool reverse_axis, bool texture_direction, float tw, float th, bool legacy_behavior = false);
-       WallObject* AddGround(const std::string &name, const std::string &texture, float x1, float z1, float x2, float z2, float altitude, int tile_x, int tile_z);
+       Wall* AddDoorwayWalls(MeshObject* mesh, const std::string &wallname, const std::string &texture, float tw, float th);
+       Wall* AddWall(MeshObject* mesh, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height_in1, float height_in2, float altitude1, float altitude2, float tw, float th);
+       Wall* AddFloor(MeshObject* mesh, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float altitude1, float altitude2, bool reverse_axis, bool texture_direction, float tw, float th, bool legacy_behavior = false);
+       Wall* AddGround(const std::string &name, const std::string &texture, float x1, float z1, float x2, float z2, float altitude, int tile_x, int tile_z);
        void EnableFloorRange(int floor, int range, bool value, bool enablegroups, int shaftnumber = 0, int stairsnumber = 0);
        bool RegisterTimerCallback(TimerObject *timer);
        bool UnregisterTimerCallback(TimerObject *timer);
@@ -282,7 +282,7 @@ public:
        Model* AddModel(const std::string &name, const std::string &filename, bool center, const Ogre::Vector3 &position, const Ogre::Vector3 &rotation, float max_render_distance = 0, float scale_multiplier = 1, bool enable_physics = false, float restitution = 0, float friction = 0, float mass = 0);
        void AddModel(Model *model);
        Ogre::Vector2 GetExtents(std::vector<Ogre::Vector3> &varray, int coord, bool flip_z = false);
-       void Cut(WallObject *wall, Ogre::Vector3 start, Ogre::Vector3 end, bool cutwalls, bool cutfloors, int checkwallnumber = 0, bool reset_check = true);
+       void Cut(Wall *wall, Ogre::Vector3 start, Ogre::Vector3 end, bool cutwalls, bool cutfloors, int checkwallnumber = 0, bool reset_check = true);
        Ogre::Vector3 GetPolygonDirection(std::vector<Ogre::Vector3> &polygon);
        int GetConfigInt(const std::string &key, int default_value);
        std::string GetConfigString(const std::string &key, const std::string &default_value);
@@ -334,7 +334,7 @@ public:
        int GetEscalatorCount();
        void IncrementEscalatorCount();
        void DecrementEscalatorCount();
-       bool HitBeam(const Ogre::Ray &ray, float max_distance, MeshObject *&mesh, WallObject *&wall, Ogre::Vector3 &hit_position);
+       bool HitBeam(const Ogre::Ray &ray, float max_distance, MeshObject *&mesh, Wall *&wall, Ogre::Vector3 &hit_position);
        void EnableRandomActivity(bool value);
        SoundSystem* GetSoundSystem();
        bool IsObjectValid(Object* object, std::string type = "");
index 94a90e9..381724e 100644 (file)
@@ -209,7 +209,7 @@ Shaft::~Shaft()
                sbs->RemoveShaft(this);
 }
 
-WallObject* Shaft::AddWall(int floor, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height1, float height2, float voffset1, float voffset2, float tw, float th)
+Wall* Shaft::AddWall(int floor, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height1, float height2, float voffset1, float voffset2, float tw, float th)
 {
        //exit with an error if floor is invalid
        if (IsValidFloor(floor) == false)
@@ -218,12 +218,12 @@ WallObject* Shaft::AddWall(int floor, const std::string &name, const std::string
                return 0;
        }
 
-       WallObject *wall = GetMeshObject(floor)->CreateWallObject(name);
+       Wall *wall = GetMeshObject(floor)->CreateWallObject(name);
        AddWall(wall, floor, name, texture, thickness, x1, z1, x2, z2, height1, height2, voffset1, voffset2, tw, th);
        return wall;
 }
 
-bool Shaft::AddWall(WallObject *wall, int floor, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height1, float height2, float voffset1, float voffset2, float tw, float th)
+bool Shaft::AddWall(Wall *wall, int floor, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height1, float height2, float voffset1, float voffset2, float tw, float th)
 {
        //exit with an error if floor is invalid
        if (IsValidFloor(floor) == false)
@@ -232,7 +232,7 @@ bool Shaft::AddWall(WallObject *wall, int floor, const std::string &name, const
        return sbs->AddWallMain(wall, name, texture, thickness, x1, z1, x2, z2, height1, height2, voffset1, voffset2, tw, th, true);
 }
 
-WallObject* Shaft::AddFloor(int floor, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float voffset1, float voffset2, bool reverse_axis, bool texture_direction, float tw, float th, bool legacy_behavior)
+Wall* Shaft::AddFloor(int floor, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float voffset1, float voffset2, bool reverse_axis, bool texture_direction, float tw, float th, bool legacy_behavior)
 {
        //exit with an error if floor is invalid
        if (IsValidFloor(floor) == false)
@@ -241,12 +241,12 @@ WallObject* Shaft::AddFloor(int floor, const std::string &name, const std::strin
                return 0;
        }
 
-       WallObject *wall = GetMeshObject(floor)->CreateWallObject(name);
+       Wall *wall = GetMeshObject(floor)->CreateWallObject(name);
        AddFloor(wall, floor, name, texture, thickness, x1, z1, x2, z2, voffset1, voffset2, reverse_axis, texture_direction, tw, th, legacy_behavior);
        return wall;
 }
 
-bool Shaft::AddFloor(WallObject *wall, int floor, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float voffset1, float voffset2, bool reverse_axis, bool texture_direction, float tw, float th, bool legacy_behavior)
+bool Shaft::AddFloor(Wall *wall, int floor, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float voffset1, float voffset2, bool reverse_axis, bool texture_direction, float tw, float th, bool legacy_behavior)
 {
        //exit with an error if floor is invalid
        if (IsValidFloor(floor) == false)
index 0b0651f..29a581b 100644 (file)
@@ -48,10 +48,10 @@ public:
 
        Shaft(Object *parent, int number, float CenterX, float CenterZ, int startfloor, int endfloor);
        ~Shaft();
-       WallObject* AddWall(int floor, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height1, float height2, float voffset1, float voffset2, float tw, float th);
-       bool AddWall(WallObject *wall, int floor, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height1, float height2, float voffset1, float voffset2, float tw, float th);
-       WallObject* AddFloor(int floor, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float voffset1, float voffset2, bool reverse_axis, bool texture_direction, float tw, float th, bool legacy_behavior = false);
-       bool AddFloor(WallObject *wall, int floor, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float voffset1, float voffset2, bool reverse_axis, bool texture_direction, float tw, float th, bool legacy_behavior = false);
+       Wall* AddWall(int floor, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height1, float height2, float voffset1, float voffset2, float tw, float th);
+       bool AddWall(Wall *wall, int floor, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height1, float height2, float voffset1, float voffset2, float tw, float th);
+       Wall* AddFloor(int floor, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float voffset1, float voffset2, bool reverse_axis, bool texture_direction, float tw, float th, bool legacy_behavior = false);
+       bool AddFloor(Wall *wall, int floor, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float voffset1, float voffset2, bool reverse_axis, bool texture_direction, float tw, float th, bool legacy_behavior = false);
        void Enabled(int floor, bool value, bool EnableShaftDoors);
        void EnableWholeShaft(bool value, bool EnableShaftDoors, bool force = false);
        bool IsInShaft(const Ogre::Vector3 &position);
index 7e53b8d..3762202 100644 (file)
@@ -185,7 +185,7 @@ Stairs::~Stairs()
                sbs->RemoveStairs(this);
 }
 
-WallObject* Stairs::AddStairs(int floor, const std::string &name, const std::string &texture, const std::string &direction, float CenterX, float CenterZ, float width, float risersize, float treadsize, int num_stairs, float voffset, float tw, float th)
+Wall* Stairs::AddStairs(int floor, const std::string &name, const std::string &texture, const std::string &direction, float CenterX, float CenterZ, float width, float risersize, float treadsize, int num_stairs, float voffset, float tw, float th)
 {
        //num_stairs is subtracted by 1 since it includes the floor platform above, but not below
        //direction is where the stair base is - front, back, left, or right.
@@ -198,7 +198,7 @@ WallObject* Stairs::AddStairs(int floor, const std::string &name, const std::str
        }
 
        //create wall object
-       WallObject *wall = GetMeshObject(floor)->CreateWallObject(name);
+       Wall *wall = GetMeshObject(floor)->CreateWallObject(name);
 
        std::string Name = name;
        TrimString(Name);
@@ -296,7 +296,7 @@ WallObject* Stairs::AddStairs(int floor, const std::string &name, const std::str
        return wall;
 }
 
-WallObject* Stairs::AddWall(int floor, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height1, float height2, float voffset1, float voffset2, float tw, float th)
+Wall* Stairs::AddWall(int floor, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height1, float height2, float voffset1, float voffset2, float tw, float th)
 {
        //exit with an error if floor is invalid
        if (IsValidFloor(floor) == false)
@@ -305,12 +305,12 @@ WallObject* Stairs::AddWall(int floor, const std::string &name, const std::strin
                return 0;
        }
 
-       WallObject *wall = GetMeshObject(floor)->CreateWallObject(name);
+       Wall *wall = GetMeshObject(floor)->CreateWallObject(name);
        AddWall(wall, floor, name, texture, thickness, x1, z1, x2, z2, height1, height2, voffset1, voffset2, tw, th);
        return wall;
 }
 
-bool Stairs::AddWall(WallObject *wall, int floor, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height1, float height2, float voffset1, float voffset2, float tw, float th)
+bool Stairs::AddWall(Wall *wall, int floor, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height1, float height2, float voffset1, float voffset2, float tw, float th)
 {
        //exit with an error if floor is invalid
        if (IsValidFloor(floor) == false)
@@ -319,7 +319,7 @@ bool Stairs::AddWall(WallObject *wall, int floor, const std::string &name, const
        return sbs->AddWallMain(wall, name, texture, thickness, x1, z1, x2, z2, height1, height2, voffset1, voffset2, tw, th, true);
 }
 
-WallObject* Stairs::AddFloor(int floor, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float voffset1, float voffset2, bool reverse_axis, bool texture_direction, float tw, float th, bool legacy_behavior)
+Wall* Stairs::AddFloor(int floor, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float voffset1, float voffset2, bool reverse_axis, bool texture_direction, float tw, float th, bool legacy_behavior)
 {
        //exit with an error if floor is invalid
        if (IsValidFloor(floor) == false)
@@ -328,12 +328,12 @@ WallObject* Stairs::AddFloor(int floor, const std::string &name, const std::stri
                return 0;
        }
 
-       WallObject *wall = GetMeshObject(floor)->CreateWallObject(name);
+       Wall *wall = GetMeshObject(floor)->CreateWallObject(name);
        AddFloor(wall, floor, name, texture, thickness, x1, z1, x2, z2, voffset1, voffset2, reverse_axis, texture_direction, tw, th, legacy_behavior);
        return wall;
 }
 
-bool Stairs::AddFloor(WallObject *wall, int floor, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float voffset1, float voffset2, bool reverse_axis, bool texture_direction, float tw, float th, bool legacy_behavior)
+bool Stairs::AddFloor(Wall *wall, int floor, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float voffset1, float voffset2, bool reverse_axis, bool texture_direction, float tw, float th, bool legacy_behavior)
 {
        //exit with an error if floor is invalid
        if (IsValidFloor(floor) == false)
index dbf76a2..0045cf7 100644 (file)
@@ -44,11 +44,11 @@ public:
 
        Stairs(Object *parent, int number, float CenterX, float CenterZ, int startfloor, int endfloor);
        ~Stairs();
-       WallObject* AddStairs(int floor, const std::string &name, const std::string &texture, const std::string &direction, float CenterX, float CenterZ, float width, float risersize, float treadsize, int num_stairs, float voffset, float tw, float th);
-       WallObject* AddWall(int floor, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height1, float height2, float voffset1, float voffset2, float tw, float th);
-       bool AddWall(WallObject *wall, int floor, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height1, float height2, float voffset1, float voffset2, float tw, float th);
-       WallObject* AddFloor(int floor, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float voffset1, float voffset2, bool reverse_axis, bool texture_direction, float tw, float th, bool legacy_behavior = false);
-       bool AddFloor(WallObject *wall, int floor, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float voffset1, float voffset2, bool reverse_axis, bool texture_direction, float tw, float th, bool legacy_behavior = false);
+       Wall* AddStairs(int floor, const std::string &name, const std::string &texture, const std::string &direction, float CenterX, float CenterZ, float width, float risersize, float treadsize, int num_stairs, float voffset, float tw, float th);
+       Wall* AddWall(int floor, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height1, float height2, float voffset1, float voffset2, float tw, float th);
+       bool AddWall(Wall *wall, int floor, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float height1, float height2, float voffset1, float voffset2, float tw, float th);
+       Wall* AddFloor(int floor, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float voffset1, float voffset2, bool reverse_axis, bool texture_direction, float tw, float th, bool legacy_behavior = false);
+       bool AddFloor(Wall *wall, int floor, const std::string &name, const std::string &texture, float thickness, float x1, float z1, float x2, float z2, float voffset1, float voffset2, bool reverse_axis, bool texture_direction, float tw, float th, bool legacy_behavior = false);
        void Enabled(int floor, bool value);
        void EnableWholeStairwell(bool value, bool force = false);
        bool IsInStairwell(const Ogre::Vector3 &position);
index e8d4329..c45caf6 100644 (file)
@@ -33,7 +33,7 @@
 
 namespace SBS {
 
-WallObject::WallObject(MeshObject* wrapper, Object *proxy, bool temporary) : Object(wrapper, temporary)
+Wall::Wall(MeshObject* wrapper, Object *proxy, bool temporary) : Object(wrapper, temporary)
 {
        //wall object constructor
        meshwrapper = wrapper;
@@ -45,7 +45,7 @@ WallObject::WallObject(MeshObject* wrapper, Object *proxy, bool temporary) : Obj
        sbs->WallCount++;
 }
 
-WallObject::~WallObject()
+Wall::~Wall()
 {
        //wall object destructor
 
@@ -66,7 +66,7 @@ WallObject::~WallObject()
        polygons.clear();
 }
 
-Polygon* WallObject::AddQuad(const std::string &name, const std::string &texture, const Ogre::Vector3 &v1, const Ogre::Vector3 &v2, const Ogre::Vector3 &v3, const Ogre::Vector3 &v4, float tw, float th, bool autosize)
+Polygon* Wall::AddQuad(const std::string &name, const std::string &texture, const Ogre::Vector3 &v1, const Ogre::Vector3 &v2, const Ogre::Vector3 &v3, const Ogre::Vector3 &v4, float tw, float th, bool autosize)
 {
        //add a quad
 
@@ -80,7 +80,7 @@ Polygon* WallObject::AddQuad(const std::string &name, const std::string &texture
        return AddPolygon(name, texture, vertices, tw, th, autosize);
 }
 
-Polygon* WallObject::AddPolygon(const std::string &name, const std::string &texture, std::vector<Ogre::Vector3> &vertices, float tw, float th, bool autosize)
+Polygon* Wall::AddPolygon(const std::string &name, const std::string &texture, std::vector<Ogre::Vector3> &vertices, float tw, float th, bool autosize)
 {
        //create a generic polygon
        Ogre::Matrix3 tm;
@@ -107,7 +107,7 @@ Polygon* WallObject::AddPolygon(const std::string &name, const std::string &text
        return &polygons[index];
 }
 
-Polygon* WallObject::AddPolygon(const std::string &name, const std::string &material, std::vector<std::vector<Ogre::Vector3> > &vertices, Ogre::Matrix3 &tex_matrix, Ogre::Vector3 &tex_vector)
+Polygon* Wall::AddPolygon(const std::string &name, const std::string &material, std::vector<std::vector<Ogre::Vector3> > &vertices, Ogre::Matrix3 &tex_matrix, Ogre::Vector3 &tex_vector)
 {
        //add a set of polygons, providing the original material and texture mapping
        std::vector<Extents> index_extents;
@@ -129,7 +129,7 @@ Polygon* WallObject::AddPolygon(const std::string &name, const std::string &mate
        return &polygons[index];
 }
 
-int WallObject::CreatePolygon(std::vector<Triangle> &triangles, std::vector<Extents> &index_extents, Ogre::Matrix3 &tex_matrix, Ogre::Vector3 &tex_vector, const std::string &material, const std::string &name, Ogre::Plane &plane)
+int Wall::CreatePolygon(std::vector<Triangle> &triangles, std::vector<Extents> &index_extents, Ogre::Matrix3 &tex_matrix, Ogre::Vector3 &tex_vector, const std::string &material, const std::string &name, Ogre::Plane &plane)
 {
        //create a polygon handle
 
@@ -140,7 +140,7 @@ int WallObject::CreatePolygon(std::vector<Triangle> &triangles, std::vector<Exte
        return (int)polygons.size() - 1;
 }
 
-void WallObject::DeletePolygons(bool recreate_collider)
+void Wall::DeletePolygons(bool recreate_collider)
 {
        //delete polygons
 
@@ -158,7 +158,7 @@ void WallObject::DeletePolygons(bool recreate_collider)
        }
 }
 
-void WallObject::DeletePolygon(int index, bool recreate_colliders)
+void Wall::DeletePolygon(int index, bool recreate_colliders)
 {
        //delete a single polygon
 
@@ -180,23 +180,23 @@ void WallObject::DeletePolygon(int index, bool recreate_colliders)
        }
 }
 
-int WallObject::GetPolygonCount()
+int Wall::GetPolygonCount()
 {
        return (int)polygons.size();
 }
 
-Polygon* WallObject::GetPolygon(int index)
+Polygon* Wall::GetPolygon(int index)
 {
        if (index > -1 && index < (int)polygons.size())
                return &polygons[index];
        return 0;
 }
 
-int WallObject::FindPolygon(const std::string &name)
+int Wall::FindPolygon(const std::string &name)
 {
        //find a polygon object by name
 
-       SBS_PROFILE("WallObject::FindPolygon");
+       SBS_PROFILE("Wall::FindPolygon");
 
        for (size_t i = 0; i < polygons.size(); i++)
        {
@@ -206,7 +206,7 @@ int WallObject::FindPolygon(const std::string &name)
        return -1;
 }
 
-void WallObject::GetGeometry(int index, std::vector<std::vector<Ogre::Vector3> > &vertices, bool firstonly, bool convert, bool rescale, bool relative, bool reverse)
+void Wall::GetGeometry(int index, std::vector<std::vector<Ogre::Vector3> > &vertices, bool firstonly, bool convert, bool rescale, bool relative, bool reverse)
 {
        //gets vertex geometry using mesh's vertex extent arrays; returns vertices in 'vertices'
 
@@ -222,11 +222,11 @@ void WallObject::GetGeometry(int index, std::vector<std::vector<Ogre::Vector3> >
        polygons[index].GetGeometry(vertices, firstonly, convert, rescale, relative, reverse);
 }
 
-bool WallObject::IntersectsWall(Ogre::Vector3 start, Ogre::Vector3 end, Ogre::Vector3 &isect, bool convert)
+bool Wall::IntersectsWall(Ogre::Vector3 start, Ogre::Vector3 end, Ogre::Vector3 &isect, bool convert)
 {
        //check through polygons to see if the specified line intersects with this wall object
 
-       SBS_PROFILE("WallObject::IntersectsWall");
+       SBS_PROFILE("Wall::IntersectsWall");
        float pr, best_pr = 2000000000.;
        int best_i = -1;
        Ogre::Vector3 cur_isect, normal;
@@ -256,7 +256,7 @@ bool WallObject::IntersectsWall(Ogre::Vector3 start, Ogre::Vector3 end, Ogre::Ve
        return false;
 }
 
-void WallObject::Move(const Ogre::Vector3 &position, float speed)
+void Wall::Move(const Ogre::Vector3 &position, float speed)
 {
        //move a wall object
 
@@ -272,17 +272,17 @@ void WallObject::Move(const Ogre::Vector3 &position, float speed)
        meshwrapper->CreateCollider();
 }
 
-MeshObject* WallObject::GetMesh()
+MeshObject* Wall::GetMesh()
 {
        return meshwrapper;
 }
 
-void WallObject::SetParentArray(std::vector<WallObject*> &array)
+void Wall::SetParentArray(std::vector<Wall*> &array)
 {
        parent_array = &array;
 }
 
-Ogre::Vector3 WallObject::GetPoint(const Ogre::Vector3 &start, const Ogre::Vector3 &end)
+Ogre::Vector3 Wall::GetPoint(const Ogre::Vector3 &start, const Ogre::Vector3 &end)
 {
        //do a line intersection with this wall, and return the intersection point
 
@@ -290,7 +290,7 @@ Ogre::Vector3 WallObject::GetPoint(const Ogre::Vector3 &start, const Ogre::Vecto
        float distance = 2000000000.;
        Ogre::Vector3 normal = Ogre::Vector3::ZERO;
 
-       WallObject *result = meshwrapper->FindWallIntersect(sbs->ToRemote(start), sbs->ToRemote(end), isect, distance, normal, this);
+       Wall *result = meshwrapper->FindWallIntersect(sbs->ToRemote(start), sbs->ToRemote(end), isect, distance, normal, this);
 
        if (result)
                return sbs->ToLocal(isect);
@@ -298,7 +298,7 @@ Ogre::Vector3 WallObject::GetPoint(const Ogre::Vector3 &start, const Ogre::Vecto
        return Ogre::Vector3(0, 0, 0);
 }
 
-Ogre::Vector3 WallObject::GetWallExtents(float altitude, bool get_max)
+Ogre::Vector3 Wall::GetWallExtents(float altitude, bool get_max)
 {
        //return the X and Z extents of this wall object at a specific altitude, by doing a double plane cut
 
index 2159e85..a4ff2ee 100644 (file)
 
 namespace SBS {
 
-class SBSIMPEXP WallObject : public Object
+class SBSIMPEXP Wall : public Object
 {
 public:
 
        //functions
-       WallObject(MeshObject* wrapper, Object *proxy = 0, bool temporary = false);
-       ~WallObject();
+       Wall(MeshObject* wrapper, Object *proxy = 0, bool temporary = false);
+       ~Wall();
        Polygon* AddQuad(const std::string &name, const std::string &texture, const Ogre::Vector3 &v1, const Ogre::Vector3 &v2, const Ogre::Vector3 &v3, const Ogre::Vector3 &v4, float tw, float th, bool autosize);
        Polygon* AddPolygon(const std::string &name, const std::string &texture, std::vector<Ogre::Vector3> &vertices, float tw, float th, bool autosize);
        Polygon* AddPolygon(const std::string &name, const std::string &material, std::vector<std::vector<Ogre::Vector3> > &vertices, Ogre::Matrix3 &tex_matrix, Ogre::Vector3 &tex_vector);
@@ -50,7 +50,7 @@ public:
        bool IntersectsWall(Ogre::Vector3 start, Ogre::Vector3 end, Ogre::Vector3 &isect, bool convert = true);
        void Move(const Ogre::Vector3 &position, float speed = 1.0f);
        MeshObject* GetMesh();
-       void SetParentArray(std::vector<WallObject*> &array);
+       void SetParentArray(std::vector<Wall*> &array);
        Ogre::Vector3 GetPoint(const Ogre::Vector3 &start, const Ogre::Vector3 &end);
        Ogre::Vector3 GetWallExtents(float altitude, bool get_max);
 
@@ -62,7 +62,7 @@ private:
        std::vector<Polygon> polygons;
 
        //pointer to parent array
-       std::vector<WallObject*> *parent_array;
+       std::vector<Wall*> *parent_array;
 };
 
 }