aboutsummaryrefslogtreecommitdiff
path: root/AmpelJonas/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'AmpelJonas/main.cpp')
-rw-r--r--AmpelJonas/main.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/AmpelJonas/main.cpp b/AmpelJonas/main.cpp
index d88ca9b..ea729ac 100644
--- a/AmpelJonas/main.cpp
+++ b/AmpelJonas/main.cpp
@@ -6,7 +6,9 @@
int main()
{
+ unsigned long int framecounter = 0;
cRender a(' ', _COL_DEFAULT, 10,10);
+ a.render();
cObjectHandler b(&a);
cObject x(1,1);
@@ -15,15 +17,17 @@ int main()
int dir2 = -1;
int cntr = 0;
+ a.clear(true);
b.moveObject(i, {0,30}, _MOVE_ABSOULUTE);
x.drawPoint('X', {0,0}, true,_COL_GREEN);
+
while(1)
{
b.moveObject(i, {2 * dir1, 1 * dir2}, _MOVE_RELATIVE);
b.write();
+ a.drawText(to_string(framecounter), {0,0}, _COL_RED);
a.render();
- usleep(10*1000);
if(x.getPosition().x <= 0)
dir1 *= -1;
@@ -40,8 +44,12 @@ int main()
dir2 *= -1;
x.setPosition({x.getPosition().x, a.getSize().y});
}
- }
- a.render();
+ framecounter++;
+ //cin.get();
+ usleep(100*1000);
+ //for(unsigned int i = 0; i < 6000; i++)
+ //for(unsigned int o = 0; o < 3000; o++);
+ }
return 0;
}