From 6c0a0cc29b00d0a58a3ee55a8a7e4909ebf3454c Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Fri, 30 Dec 2016 17:57:42 +0100 Subject: Use format strings for draw_text and log --- src/objects/obj_control.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src') 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 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); } -- cgit v1.2.3-70-g09d2