summaryrefslogtreecommitdiff
path: root/src/code_800C9CC.c
diff options
context:
space:
mode:
authorSeth Barberee <seth.barberee@gmail.com>2021-05-15 16:59:55 -0700
committerGitHub <noreply@github.com>2021-05-15 18:59:55 -0500
commitf402e46cd3c8b7236673d6edbae77903a7cc0618 (patch)
tree37a19f3ab35a73c29d4d6da565741beaf7bb547f /src/code_800C9CC.c
parentf65dee5a143bd543c74c010d7252eb76893ee243 (diff)
Sese's April/May Dump (#37)
* splitting lots of pokemon square and labeling lots of other things * actually commit this stuff * more moving data and things * more screen work * split out some pokemon dungeon data * lots of data work * push more data work * split kecleon, decomp another kanghaskhan func, and try to doc UpdateBGControl more * lots of item work * label more item things * subtype -> category and doc types/category
Diffstat (limited to 'src/code_800C9CC.c')
-rw-r--r--src/code_800C9CC.c36
1 files changed, 16 insertions, 20 deletions
diff --git a/src/code_800C9CC.c b/src/code_800C9CC.c
index 2b0c8dd..cbd2ede 100644
--- a/src/code_800C9CC.c
+++ b/src/code_800C9CC.c
@@ -3,8 +3,8 @@
#include "bg.h"
extern u16 gRawKeyInput;
-extern u8 gUnknown_202D6B8;
-extern u8 gUnknown_202D6B9;
+extern u8 gBldAlpha_CoeffA;
+extern u8 gBldAlpha_CoeffB;
extern u16 gBldAlpha;
extern u8 gUnknown_202D7FE;
@@ -51,34 +51,30 @@ void ReadKeyInput(struct Inputs *r0)
gRawKeyInput = keyInput;
}
-void sub_800CC44(s32 r0, s32 r1)
+void SetBldAlphaReg(s32 lowAlpha, s32 highAlpha)
{
- if(r0 < 0)
+ if(lowAlpha < 0)
{
- r0 = 0;
+ lowAlpha = 0;
}
- else
+ else if(lowAlpha > 16)
{
- if(r0 > 0x10)
- {
- r0 = 0x10;
- }
+ lowAlpha = 16;
}
- if(r1 < 0)
+
+ if(highAlpha < 0)
{
- r1 = 0;
+ highAlpha = 0;
}
- else
+ else if(highAlpha > 16)
{
- if(r1 > 0x10)
- {
- r1 = 0x10;
- }
+ highAlpha = 16;
}
- gUnknown_202D6B8 = r0;
- gUnknown_202D6B9 = r1;
- gBldAlpha = BLDALPHA_BLEND1(gUnknown_202D6B8, gUnknown_202D6B9);
+ gBldAlpha_CoeffA = lowAlpha;
+ gBldAlpha_CoeffB = highAlpha;
+
+ gBldAlpha = BLDALPHA_BLEND1(gBldAlpha_CoeffA, gBldAlpha_CoeffB);
}
void SetBG0RegOffsets(s32 xoffset, s32 yoffset)