4 Scalable Building Simulator - Call Button Subsystem Class
5 The Skyscraper Project - Version 1.8 Alpha
6 Copyright (C)20042012 Ryan Thoryk
7 http://www.skyscrapersim.com
8 http://sourceforge.net/projects/skyscraper
9 Contact - ryan@tliquest.net
11 This program is free software; you can redistribute it and/or
12 modify it under the terms of the GNU General Public License
13 as published by the Free Software Foundation; either version 2
14 of the License, or (at your option) any later version.
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 #ifndef _SBS_CALLBUTTON_H
27 #define _SBS_CALLBUTTON_H
29 class SBSIMPEXP CallButton
33 Object *object; //SBS object
34 std::vector<int> Elevators; //elevators this call button set is assigned to
35 int floor; //floor this call button set is on
36 int Number; //call button index number (on the specified floor)
37 std::string Direction; //direction the buttons face; either 'front', 'back', 'left', or 'right'
39 bool UpStatus; //status of up light
40 bool DownStatus; //status of down light
43 CallButton(std::vector<int> &elevators, int floornum, int number, const char *BackTexture, const char *UpButtonTexture, const char *UpButtonTexture_Lit, const char *DownButtonTexture, const char *DownButtonTexture_Lit, float CenterX, float CenterZ, float voffset, const char *direction, float BackWidth, float BackHeight, bool ShowBack, float tw, float th);
45 void Enabled(bool value);
46 void Call(bool direction); //true is up, false is down
47 void UpLight(bool value);
48 void DownLight(bool value);
49 void SetLights(int up, int down);
50 bool ServicesElevator(int elevator);
51 void Loop(bool direction);
52 void Report(const char *message);
53 bool ReportError(const char *message);
56 MeshObject* CallButtonBackMesh; //call button mesh object
57 MeshObject* CallButtonMeshUp; //call button mesh object
58 MeshObject* CallButtonMeshDown; //call button mesh object
60 std::string UpTexture, UpTextureLit;
61 std::string DownTexture, DownTextureLit;