summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authornotyourav <65437533+notyourav@users.noreply.github.com>2022-08-05 11:20:45 -0700
committerGitHub <noreply@github.com>2022-08-05 11:20:45 -0700
commiteab81dcebba378df6274c4e89f48e5f161e06df2 (patch)
tree10284ab41b188c1fa7c40b86683ecfbc3a226706 /src
parent1a3db10d1227cd2c83bb05aefdf9ba806093ae9a (diff)
parentd4eec7fdcbcd82639b1bfcc524d886ba7f0ccb6a (diff)
Merge pull request #549 from hatal175/sub_0807C69C
Match sub_0807C69C
Diffstat (limited to 'src')
-rw-r--r--src/playerUtils.c36
1 files changed, 35 insertions, 1 deletions
diff --git a/src/playerUtils.c b/src/playerUtils.c
index 2ea267a8..31dbb3fc 100644
--- a/src/playerUtils.c
+++ b/src/playerUtils.c
@@ -3255,7 +3255,41 @@ NONMATCH("asm/non_matching/playerUtils/sub_0807C5F4.inc", void sub_0807C5F4(u16*
}
END_NONMATCH
-ASM_FUNC("asm/non_matching/playerUtils/sub_0807C69C.inc", void sub_0807C69C(u8* a, u32 b, u32 c))
+void sub_0807C69C(u8* data, u32 width, u32 height) {
+ u8* ptr1;
+ u8* ptr2;
+ u32 index;
+ u32 innerIndex;
+ u32 tmp1;
+
+ ptr2 = data + width * height - 1;
+ ptr1 = data + (height - 1) * 0x40 - 1 + width;
+
+ for (index = 0; index < height; index++) {
+ for (innerIndex = 0; innerIndex < width; innerIndex++) {
+ ptr1[-innerIndex] = ptr2[-innerIndex];
+ }
+ ptr1 -= 0x40;
+ ptr2 -= width;
+ }
+
+ tmp1 = 0x40 - width;
+
+ for (index = 0; index < 0x40; index++) {
+ ptr1 = data + width + (index * 0x40);
+ for (innerIndex = 0; innerIndex < tmp1; innerIndex++) {
+ ptr1[innerIndex] = 0;
+ }
+ }
+
+ tmp1 = 0x40 - height;
+ ptr1 = data + height * 0x40;
+
+ for (index = 0; index < tmp1; index++) {
+ MemClear(ptr1, 0x40);
+ ptr1 += 0x40;
+ }
+}
NONMATCH("asm/non_matching/playerUtils/sub_0807C740.inc", void InitializeCamera()) {
s32 targetX;