summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-10-10 03:14:48 +0200
committerTreeki <treeki@gmail.com>2012-10-10 03:14:48 +0200
commit9c6837fbd8d60a2e4e9d65ef0fd2437ce2dcf77b (patch)
tree399aabfbc05a583b1440647368bcf6ae0e615216
parentc1c7f656efdecd6da7923de46eb113699f256ff6 (diff)
downloadkamek-9c6837fbd8d60a2e4e9d65ef0fd2437ce2dcf77b.tar.gz
kamek-9c6837fbd8d60a2e4e9d65ef0fd2437ce2dcf77b.zip
might as well commit it: better heapbar that shows another disableflag
-rw-r--r--src/heapbar.S2
-rw-r--r--src/heapbar.cpp20
2 files changed, 20 insertions, 2 deletions
diff --git a/src/heapbar.S b/src/heapbar.S
index b8b1f6d..4e728e2 100644
--- a/src/heapbar.S
+++ b/src/heapbar.S
@@ -73,7 +73,7 @@ doHeapBar:
lwz r6, 0x3128(r6)
lis r3, THE_THING@h
ori r3, r3, THE_THING@l
- bl OSReport
+ #bl OSReport
bl cppGXEnd
diff --git a/src/heapbar.cpp b/src/heapbar.cpp
index 8fe756c..7f7060f 100644
--- a/src/heapbar.cpp
+++ b/src/heapbar.cpp
@@ -17,6 +17,7 @@
#include "rvl/vifuncs.h"
extern u32 Global5758;
+extern u8 GlobalEnableFlag;
#define GXPosition3f32(x,y,z) \
*((volatile float*)0xCC008000) = (x); \
@@ -70,7 +71,7 @@ float y_positions[] = {
32.0f,
};
-#define END_AT 48.0f
+#define END_AT 80.0f
u32 colours[] = {
-1,
@@ -144,6 +145,23 @@ void cppProcessHeap(u32 freeSize, u32 heapSize, int heapID, char *name) {
GXEnd();
}
}
+
+ for (int i = 0; i < 8; i++) {
+ if (GlobalEnableFlag & (1 << i)) {
+ GXBegin(GX_QUADS, GX_VTXFMT0, 4);
+
+ GXPosition3f32(16*i, END_AT+32.0f, 0.0);
+ GXColor1u32(0xffffffff);
+ GXPosition3f32(16*i+16, END_AT+32.0f, 0.0);
+ GXColor1u32(0xffffffff);
+ GXPosition3f32(16*i+16, END_AT+40.0f, 0.0);
+ GXColor1u32(0xffffffff);
+ GXPosition3f32(16*i, END_AT+40.0f, 0.0);
+ GXColor1u32(0xffffffff);
+
+ GXEnd();
+ }
+ }
}