From 7495d8ca26cdb25056667ae8a8d860005ee2a68f Mon Sep 17 00:00:00 2001 From: "chirs241097@gmail.com" Date: Thu, 19 Jun 2014 11:51:22 +0000 Subject: Add player position display into debug display. Rewrite pinball, adding collision between the balls... The collision code is based on Kollision (a game included in KDE SC). --- main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp index eb47dc0..910a030 100644 --- a/main.cpp +++ b/main.cpp @@ -973,12 +973,13 @@ bool FrameFunc() if (!LOWFPS&&infofade<0xFF)++infofade; if (LOWFPS&&infofade<=0xEF)infofade+=16; } - if(hge->Input_GetKeyStateEx(HGEK_A)==HGEKST_HIT)showalloc^=1; - if(showalloc) + if(hge->Input_GetKeyStateEx(HGEK_A)==HGEKST_HIT)showdebug^=1; + if(showdebug) { fnt->SetColor(0xFFFFFFFF); fnt->printf(795, 0, HGETEXT_RIGHT, "Allocated bullets %d",bulcnt); fnt->printf(795, 25, HGETEXT_RIGHT, "%d in use",bulinuse); + fnt->printf(795, 50, HGETEXT_RIGHT, "Player pos (%.2f,%.2f)",playerpos.x,playerpos.y); } fnt->SetColor(SETA(0xFFFFFF,infofade)); fnt->printf(5, 0, HGETEXT_LEFT, "Frames to go: %d",frameleft); -- cgit v1.2.3