From 1e76ef7d2df9d49a905f416774f33fdedfcf6f34 Mon Sep 17 00:00:00 2001 From: Daniel Jones Date: Mon, 29 Jun 2020 22:45:32 +0930 Subject: Logic: created ned Object class and derived gates from that This class will allow us to make new devices (displays, custom gates etc) easily --- Gate.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Gate.cpp') diff --git a/Gate.cpp b/Gate.cpp index 51a1652..a1ed3a7 100644 --- a/Gate.cpp +++ b/Gate.cpp @@ -15,7 +15,7 @@ #include "Gate.h" -int Gate::gate_id_counter = 0; +int Object::object_id_counter = 0; // initialise static object counter FIXME: do it somehwere else? Gate::Gate(GATE_TYPE type, int x, int y, int width, int height, int loaded_id) { @@ -28,7 +28,7 @@ Gate::Gate(GATE_TYPE type, int x, int y, int width, int height, int loaded_id) if (loaded_id != -1) this->id = loaded_id; else - this->id = Gate::gate_id_counter++; // increment counter after assigning + this->id = Object::object_id_counter++; // increment counter after assigning this->x = x; this->y = y; this->w = width; -- cgit v1.2.3