/[Sims3RigEditor]/trunk/gr2lib_cpp/grannyfile.cpp
ViewVC logotype

Diff of /trunk/gr2lib_cpp/grannyfile.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

--- trunk/gr2lib_cpp/grannyfile.cpp	2010/07/29 17:25:37	5
+++ trunk/gr2lib_cpp/grannyfile.cpp	2010/07/30 00:28:19	6
@@ -1,7 +1,7 @@
 #include "StdAfx.h"
 #include "grannyfile.h"
 #include "granny.h"
-
+#include "GrannyAPILogger.h"
 #include <stdio.h>
 #include <iostream>
 #include <stdlib.h>
@@ -11,10 +11,14 @@
 {
 	namespace core
 	{
+		GRANNY_CALLBACK(void) Callback(granny_log_message_type Type, granny_log_message_origin Origin, char const * Message, void * UserData);
+		GRANNY_CALLBACK(void) Callback(granny_log_message_type Type, granny_log_message_origin Origin, char const * Message, void * UserData)
+		{
+			assert(Message);
+		}
 		grannyfile::grannyfile(const char* filename)
 		{
 			GrannyAPIVersion = new apiversion::granny2apiversion();
-			_GrannyFilename = filename;
 			grannyfile::parse_granny_file();
 			
 		}
@@ -26,6 +30,11 @@
 		}
 		void grannyfile::parse_granny_file()
 		{		
+			granny_log_callback* NewCallback = new granny_log_callback();
+			NewCallback->Function = &Callback;
+			NewCallback->UserData = NULL;
+			GrannySetLogCallback(NewCallback);
+
 			_grn_file = GrannyReadEntireFile(_GrannyFilename);		
 			if (_grn_file != 0)
 			{

 

  ViewVC Help
Powered by ViewVC 1.1.22