From 7f79b2e216617ff74ebd41ac02663b20ef3d0904 Mon Sep 17 00:00:00 2001 From: tom Date: Sat, 21 Nov 2015 12:30:13 -0600 Subject: began adding collision *added a location class for ease *much refractoring needed to fully implement it* --- src/Frame.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/Frame.cpp') diff --git a/src/Frame.cpp b/src/Frame.cpp index 4a0df5d..77c7063 100644 --- a/src/Frame.cpp +++ b/src/Frame.cpp @@ -44,17 +44,17 @@ Frame::~Frame() { delwin(w); } - +/* void Frame::add(Character &c) { mvwaddch(w,c.getRow(),c.getCol(),c.getSymbol()); } - +*/ void Frame::erase(Character &c) { mvwaddch(w,c.getRow(),c.getCol(),' '); } - +/* void Frame::add(Character &c, int nRow, int nCol) { if((nRow >= 0 && nRow < height) && (nCol >= 0 && nCol < width)) @@ -64,7 +64,7 @@ void Frame::add(Character &c, int nRow, int nCol) c.move(nRow,nCol); } } - +*/ void Frame::center(Character &ch) { if(hasSuper) @@ -72,8 +72,8 @@ void Frame::center(Character &ch) int rr = row; int cc = col; int hh, ww; - int r = ch.getRow() - height/2; - int c = ch.getCol() - width/2; + int r = ch.getLocation().x - height/2; + int c = ch.getLocation().y - width/2; getmaxyx(super, hh, ww); -- cgit v1.2.3