summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKaz <kazbloxmc@gmail.com>2020-05-30 19:14:20 -0400
committerKaz <kazbloxmc@gmail.com>2020-05-30 19:14:20 -0400
commit164d55e3e6166ed56c652346c99b30b0c0c7e158 (patch)
tree1c8169f74c8cfa4ed48b88c122a61141dbf08f66 /src
parenta85e73bcc456a6a59ea86968e81f1b15c6179f3a (diff)
money.c: Draw10000Sprite WIP
Diffstat (limited to 'src')
-rw-r--r--src/money.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/money.c b/src/money.c
index 53800f854..bf93f6dd1 100644
--- a/src/money.c
+++ b/src/money.c
@@ -176,8 +176,32 @@ void sub_80B7AEC(u32 arg0, u8 right, u8 top)
#endif
}
+#ifdef NONMATCHING
+void Draw10000Sprite(u8 var1, u8 var2, s32 var3)
+{
+ // 2D/3D array manipulation off the wazoo.
+ // Converting to 2D/3D array casts makes it match less!
+ u16 i;
+
+ CpuFastSet(
+ (void*)&gDecoration10000_Gfx[var3 * 0x100],
+ (void*)(VRAM + 0x8000 + (var2 * 0x3c0) + ((var1 + 1) * 0x20)),
+ 32);
+ CpuFastSet(
+ (void*)&gDecoration10000_Gfx[var3 * 0x100 + 0x80],
+ (void*)(VRAM + 0x8000 + ((var2 + 1) * 0x3c0) + ((var1 + 1) * 0x20)),
+ 32);
+
+ for (i = 0; i < 4; i++)
+ {
+ u32 base = var2 * 0x20 + var1 + i;
+ ((u16 *)(VRAM + 0xF800))[base] = var2 * 0x1e + 1 + var1 + (u16)-4096;
+ ((u16 *)(VRAM + 0xF840))[base] = (var2 + 1) * 0x1e + 1 + var1 + (u16)-4096;
+ };
+}
+#else
NAKED
-void Draw10000Sprite(u8 var1, u8 var2, int var3)
+void Draw10000Sprite(u8 var1, u8 var2, s32 var3)
{
asm(".syntax unified\n\
push {r4-r7,lr}\n\
@@ -269,6 +293,7 @@ _080B7BE4: .4byte 0x0600f800\n\
_080B7BE8: .4byte 0x0600f840\n\
.syntax divided\n");
}
+#endif
void UpdateMoneyWindow(u32 amount, u8 x, u8 y)
{