From ae7ee51ff98697cf16122684489bfa9ba125b009 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Thu, 23 Feb 2012 11:32:58 +0000 Subject: saving model settings avoids segmentation fault --- bin/data/settings.xml | 6 +++--- map4.layout | 13 ++++++++----- src/testApp.cpp | 6 +++++- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/bin/data/settings.xml b/bin/data/settings.xml index 53dfbf7..ba0a4f8 100644 --- a/bin/data/settings.xml +++ b/bin/data/settings.xml @@ -1,10 +1,10 @@ - + - + - + diff --git a/map4.layout b/map4.layout index 98f5fcf..291d1d1 100644 --- a/map4.layout +++ b/map4.layout @@ -8,11 +8,14 @@ - + + + + @@ -26,15 +29,15 @@ - + - + - + - + diff --git a/src/testApp.cpp b/src/testApp.cpp index 5e0661e..7ae3aca 100644 --- a/src/testApp.cpp +++ b/src/testApp.cpp @@ -40,7 +40,7 @@ void testApp::setup(){ texture.play(); light=true; - + } //-------------------------------------------------------------- @@ -203,6 +203,10 @@ void testApp::saveSettings(string filename){ //send a pointer to the vp //renavigate? easiest way to get the settings back out + XML.setAttribute("map4","model",model_name,0); + XML.setAttribute("map4","x",ofToString(model_x),0); + XML.setAttribute("map4","y",ofToString(model_y),0); + XML.setAttribute("map4","z",ofToString(model_z),0); if(XML.pushTag("map4")) { for (int i=0;i