X-Git-Url: https://irasnyder.com/gitweb/?a=blobdiff_plain;ds=sidebyside;f=main.cpp;h=5ac3fe9c8f84bbc4025f13e5e983bb8b616e1212;hb=2172ce055533d5865d58538ee00bf609e59b0f99;hp=9b2d2e0b6e83cf2c15c6111394c789413db5eed8;hpb=0f2350d5ad9a6bc431bbcce84e8b61a784328bea;p=cs356-p1-elevator.git diff --git a/main.cpp b/main.cpp index 9b2d2e0..5ac3fe9 100644 --- a/main.cpp +++ b/main.cpp @@ -1,13 +1,14 @@ #include "main.hpp" +#include "elevatorgui.hpp" -ElevatorGUI *thegui = NULL; +static ElevatorGUI *thegui = NULL; int main (int argc, char *argv[]) { int floors = 7; int elevators = 3; -#define USE_STATIC_FLOORS 1 +//#define USE_STATIC_FLOORS 1 #ifndef USE_STATIC_FLOORS do { @@ -62,4 +63,30 @@ int main (int argc, char *argv[]) return 0; } + +void gui_update_position_label (int elevator, float new_position, Direction direction) +{ + thegui->gui_update_position_label (elevator, new_position, direction); +} + +void gui_unpress_call_button (int floor, Direction direction) +{ + thegui->gui_unpress_call_button (floor, direction); +} + +void gui_unpress_request_button (int elevator, int floor) +{ + thegui->gui_unpress_request_button (elevator, floor); +} + +void gui_open_door (int elevator, int floor) +{ + thegui->gui_open_door (elevator, floor); +} + +void gui_close_door (int elevator, int floor) +{ + thegui->gui_close_door (elevator, floor); +} + /* vim: set ts=4 sts=4 sw=4 noet tw=112: */