diff options
author | Daniel Jones <admin@danieljon.es> | 2020-06-29 22:45:32 +0930 |
---|---|---|
committer | Daniel Jones <admin@danieljon.es> | 2020-06-29 22:45:32 +0930 |
commit | 1e76ef7d2df9d49a905f416774f33fdedfcf6f34 (patch) | |
tree | 22e37a8cb08cb84232e99bc235d20549a495d587 /Gate.cpp | |
parent | 11937e7d2256702698baba3acaf847523fe0f066 (diff) | |
download | foxlogicgates-1e76ef7d2df9d49a905f416774f33fdedfcf6f34.tar.gz foxlogicgates-1e76ef7d2df9d49a905f416774f33fdedfcf6f34.zip |
Logic: created ned Object class and derived gates from that
This class will allow us to make new devices (displays, custom gates etc) easily
Diffstat (limited to 'Gate.cpp')
-rw-r--r-- | Gate.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |