diff options
author | tomsmeding <tom.smeding@gmail.com> | 2016-12-30 17:57:42 +0100 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2016-12-30 17:57:42 +0100 |
commit | 6c0a0cc29b00d0a58a3ee55a8a7e4909ebf3454c (patch) | |
tree | d9bc259e593c0a1cdfa4eba401a1b7a04d05b6be /src/objects/obj_control.cpp | |
parent | f62f270de05ebe5a71ef2e66a1a0f54b4ed9dc61 (diff) |
Use format strings for draw_text and log
Diffstat (limited to 'src/objects/obj_control.cpp')
-rw-r--r-- | src/objects/obj_control.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/objects/obj_control.cpp b/src/objects/obj_control.cpp index 8f1a84b..6b6ab2c 100644 --- a/src/objects/obj_control.cpp +++ b/src/objects/obj_control.cpp @@ -3,8 +3,6 @@ OUT #include <cstdlib> double yd=0; -double id(double a){return a;} - EVENT(create){ x=10; y=240; @@ -20,8 +18,5 @@ EVENT(step){ } EVENT(draw){ - char *s; - asprintf(&s,"controllll: x=%g y=%g",id(x),id(y)); - draw_text(x,y,s); - free(s); + draw_textf(x,y,"controllll: x=%g y=%g",x,y); } |