From f402e46cd3c8b7236673d6edbae77903a7cc0618 Mon Sep 17 00:00:00 2001 From: Seth Barberee Date: Sat, 15 May 2021 16:59:55 -0700 Subject: 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 --- src/code_800C9CC.c | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) (limited to 'src/code_800C9CC.c') 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) -- cgit v1.2.3