diff --git a/group/re3.mmh b/group/re3.mmh index 1871cb4..1e2f9a4 100644 --- a/group/re3.mmh +++ b/group/re3.mmh @@ -97,6 +97,7 @@ SOURCEPATH ../src/skel SOURCE skeleton.cpp SOURCEPATH ../src/skel/symbian SOURCE symbian.cpp +SOURCE log.cpp SOURCEPATH ../src/text SOURCE Messages.cpp Pager.cpp Text.cpp SOURCEPATH ../src/vehicles diff --git a/sis/re3.sisx b/sis/re3.sisx index a7b4584..a8c27d8 100644 Binary files a/sis/re3.sisx and b/sis/re3.sisx differ diff --git a/src/skel/symbian/log.cpp b/src/skel/symbian/log.cpp new file mode 100644 index 0000000..5850b98 --- /dev/null +++ b/src/skel/symbian/log.cpp @@ -0,0 +1,34 @@ +#include +#include +#include "log.h" + +void InitLog() +{ + FILE* f = fopen("E:\\re3_log.txt", "w"); + if(f) fclose(f); +} + +void Log(const char* txt) +{ + FILE* f = fopen("E:\\re3_log.txt", "a"); + if(f){ + fprintf(f, "%s\n", txt); + fclose(f); + } +} + +void Logf(const char* fmt, ...) +{ + FILE* f = fopen("E:\\re3_log.txt", "a"); + if(!f) return; + + char buf[256]; + + va_list args; + va_start(args, fmt); + vsnprintf(buf, sizeof(buf), fmt, args); + va_end(args); + + fprintf(f, "%s\n", buf); + fclose(f); +} \ No newline at end of file diff --git a/src/skel/symbian/log.h b/src/skel/symbian/log.h new file mode 100644 index 0000000..2ea8f5f --- /dev/null +++ b/src/skel/symbian/log.h @@ -0,0 +1,5 @@ +#pragma once + +void InitLog(); +void Log(const char* txt); +void Logf(const char* fmt, ...); \ No newline at end of file diff --git a/src/skel/symbian/symbian.cpp b/src/skel/symbian/symbian.cpp index 84f0642..0450138 100644 --- a/src/skel/symbian/symbian.cpp +++ b/src/skel/symbian/symbian.cpp @@ -38,6 +38,8 @@ #include "Text.h" #include "Timer.h" +#include "log.h" + psGlobalType psGlobal; uint32 gGameState = 0; @@ -335,6 +337,9 @@ public: } void ConstructL(const TRect& aRect, CAknAppUi* aAppUi) { + InitLog(); + Log("App start"); + iAppUi = aAppUi; CreateWindowL(); iAppUi->SetOrientationL(CAknAppUiBase::EAppUiOrientationLandscape);