From b00170de3f2c15f8088a2329f51b86bba24abfd7 Mon Sep 17 00:00:00 2001 From: Treeki Date: Mon, 1 Aug 2011 16:34:28 +0200 Subject: added actor logging --- src/destroy_tracker.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 src/destroy_tracker.cpp (limited to 'src') diff --git a/src/destroy_tracker.cpp b/src/destroy_tracker.cpp new file mode 100755 index 0000000..15bace9 --- /dev/null +++ b/src/destroy_tracker.cpp @@ -0,0 +1,19 @@ +#include + +// @@ %SET_OFFSET 817F4000 + +// @@ %IFREGION pal +// @@ %PATCH 801626C0 %b:817F4000 +// @@ %ENDIF + +int trackDestroy(int objptr) { + int oldLR; + __asm__ __volatile__ ( + "mflr %0" + : "=r" (oldLR) + ); + OSReport("D%x @%x", objptr, oldLR); + return objptr; +} + + -- cgit v1.2.3