From 96038fbcb01261dfc4b786562b1ddb702c991483 Mon Sep 17 00:00:00 2001
From: tom <tom@ground-control>
Date: Wed, 18 Nov 2015 21:24:43 -0600
Subject: map successfully imports, need to do coloring next

---
 src/Frame.cpp  | 19 +++++++++++--------
 src/Screen.cpp |  3 +++
 2 files changed, 14 insertions(+), 8 deletions(-)

(limited to 'src')

diff --git a/src/Frame.cpp b/src/Frame.cpp
index 274ad20..7da219c 100644
--- a/src/Frame.cpp
+++ b/src/Frame.cpp
@@ -25,11 +25,11 @@ Frame::Frame(string location, int nRow, int nCol)
     if(file.is_open())
     {
         getline(file,line);
-        m.append(line);
+        m.push_back(line);
         i=line.length();
         while(getline(file,line))
         {
-            m.append(line);
+            m.push_back(line);
             j++;
         }
     }
@@ -135,12 +135,15 @@ void Frame::move(int nRow, int nCol)
 }
 
 void Frame::fillWindow()
-{
-    for(int i = 0; i < width;i++ )
-        for(int j = 0; j < height;j++)
-            mvwaddch(w,j,i,'.');
-       
-
+{ 
+    if(!colored)
+        for(int i = 0; i < width; i++)
+            for(int j = 0; j < height; j++)
+            {
+                attron(COLOR_PAIR(1));
+                mvwaddch(w,j,i,m[j][i]);
+            }
+    
     for(int y = 0; y < height; ++y)
     {
 	mvwaddch(w, y, 0, '-');
diff --git a/src/Screen.cpp b/src/Screen.cpp
index c3977d6..40a31d1 100644
--- a/src/Screen.cpp
+++ b/src/Screen.cpp
@@ -9,6 +9,9 @@ Screen::Screen()
     keypad(stdscr,TRUE);
     curs_set(0);
     getmaxyx(stdscr,height,width);
+    
+    start_color();
+    init_pair(1, COLOR_GREEN, COLOR_RED);
 }
 
 Screen::~Screen()
-- 
cgit v1.2.3