epp does not support variadic args
authordavemds <davemds>
Sun, 29 Jan 2012 14:41:51 +0000 (14:41 +0000)
committerdavemds <davemds@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 29 Jan 2012 14:41:51 +0000 (14:41 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@67588 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/examples/embryo_pong.edc

index 863b564..0e52ddb 100644 (file)
@@ -9,14 +9,6 @@
 #define BALL_SPEEDUP 0.1
 #define BALL_SIZE 10
 
-#if DEBUG_ENABLE
-#define DBG(...) { \
-   new _buf[128]; \
-   snprintf(_buf, sizeof(_buf), __VA_ARGS__); \
-   set_text(PART:"dbg", _buf); }
-#else
-#define DBG(...)
-#endif
 
 collections {
    group { name: "main";
@@ -148,8 +140,13 @@ collections {
             if (bx + BALL_SIZE > fw) player_wins();
 
             /* show debug info (if debug enabled) */
-            DBG("loop:%d  [speed %f  %f] [mouse: %d %d] [ball: %f %f]",
-                count, speedx, speedy, mx, my, bx, by)
+#if DEBUG_ENABLE
+            new _buf[128];
+            snprintf(_buf, sizeof(_buf),
+                     "loop:%d  [speed %f  %f] [mouse: %d %d] [ball: %f %f]",
+                     count, speedx, speedy, mx, my, bx, by);
+            set_text(PART:"dbg", _buf);
+#endif
 
             /* recall the loop in n seconds */
             timer(1.0 / FPS, "game_loop", count);