summaryrefslogtreecommitdiff
path: root/src/code/code_800ACE70.c
diff options
context:
space:
mode:
authorRoman971 <romanlasnier@hotmail.com>2020-03-22 22:19:43 +0100
committerRoman971 <romanlasnier@hotmail.com>2020-03-22 22:20:03 +0100
commit8cfe7cce9f8d8abea794e67510879e751d373a87 (patch)
treec6c46f34d3575f6dc02b98b2b5f5ad88d2b2c64e /src/code/code_800ACE70.c
parent251aea64ab3e6e8cd6f1d9ed34f514e656724777 (diff)
Format all src C files
Diffstat (limited to 'src/code/code_800ACE70.c')
-rw-r--r--src/code/code_800ACE70.c109
1 files changed, 42 insertions, 67 deletions
diff --git a/src/code/code_800ACE70.c b/src/code/code_800ACE70.c
index 9f606cffa..5bf69cc48 100644
--- a/src/code/code_800ACE70.c
+++ b/src/code/code_800ACE70.c
@@ -1,75 +1,63 @@
#include <global.h>
-typedef struct
-{
+typedef struct {
/* 0x00 */ u32 type;
/* 0x04 */ u32 setScissor;
- /* 0x08 */ union
- {
+ /* 0x08 */ union {
Color_RGBA8 c;
u32 rgba;
} color;
/* 0x0C */ u32 unk_0C;
} struct_801664F0;
-Gfx D_8012AC00[] =
-{
- gsDPSetOtherMode(
- G_AD_PATTERN | G_CD_MAGICSQ | G_CK_NONE | G_TC_CONV | G_TF_POINT | G_TT_NONE | G_TL_TILE | G_TD_CLAMP |
- G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE,
- G_AC_NONE | G_ZS_PRIM | G_RM_VISCVG | G_RM_VISCVG2),
- gsDPFillRectangle(0, 0, SCREEN_WIDTH-1, SCREEN_HEIGHT-1),
+Gfx D_8012AC00[] = {
+ gsDPSetOtherMode(G_AD_PATTERN | G_CD_MAGICSQ | G_CK_NONE | G_TC_CONV | G_TF_POINT | G_TT_NONE | G_TL_TILE |
+ G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE,
+ G_AC_NONE | G_ZS_PRIM | G_RM_VISCVG | G_RM_VISCVG2),
+ gsDPFillRectangle(0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1),
gsDPPipeSync(),
gsDPSetBlendColor(0, 0, 0, 8),
gsSPEndDisplayList(),
};
-Gfx D_8012AC28[] =
-{
- gsDPSetOtherMode(
- G_AD_PATTERN | G_CD_MAGICSQ | G_CK_NONE | G_TC_CONV | G_TF_POINT | G_TT_NONE | G_TL_TILE | G_TD_CLAMP |
- G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE,
- G_AC_NONE | G_ZS_PRIM | IM_RD | CVG_DST_CLAMP | ZMODE_OPA | FORCE_BL |
- GBL_c1(G_BL_CLR_FOG, G_BL_A_FOG,G_BL_CLR_MEM, G_BL_A_MEM) |
- GBL_c2(G_BL_CLR_FOG, G_BL_A_FOG, G_BL_CLR_MEM, G_BL_A_MEM)),
- gsDPFillRectangle(0, 0, SCREEN_WIDTH-1, SCREEN_HEIGHT-1),
+Gfx D_8012AC28[] = {
+ gsDPSetOtherMode(G_AD_PATTERN | G_CD_MAGICSQ | G_CK_NONE | G_TC_CONV | G_TF_POINT | G_TT_NONE | G_TL_TILE |
+ G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE,
+ G_AC_NONE | G_ZS_PRIM | IM_RD | CVG_DST_CLAMP | ZMODE_OPA | FORCE_BL |
+ GBL_c1(G_BL_CLR_FOG, G_BL_A_FOG, G_BL_CLR_MEM, G_BL_A_MEM) |
+ GBL_c2(G_BL_CLR_FOG, G_BL_A_FOG, G_BL_CLR_MEM, G_BL_A_MEM)),
+ gsDPFillRectangle(0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1),
gsSPEndDisplayList(),
};
-Gfx D_8012AC40[] =
-{
- gsDPSetOtherMode(
- G_AD_PATTERN | G_CD_MAGICSQ | G_CK_NONE | G_TC_CONV | G_TF_POINT | G_TT_NONE | G_TL_TILE | G_TD_CLAMP |
- G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE,
- G_AC_NONE | G_ZS_PRIM | IM_RD | CVG_DST_CLAMP | ZMODE_OPA | FORCE_BL |
- GBL_c1(G_BL_CLR_IN, G_BL_0, G_BL_CLR_MEM, G_BL_A_MEM) |
- GBL_c2(G_BL_CLR_IN, G_BL_0, G_BL_CLR_MEM, G_BL_A_MEM)),
+Gfx D_8012AC40[] = {
+ gsDPSetOtherMode(G_AD_PATTERN | G_CD_MAGICSQ | G_CK_NONE | G_TC_CONV | G_TF_POINT | G_TT_NONE | G_TL_TILE |
+ G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE,
+ G_AC_NONE | G_ZS_PRIM | IM_RD | CVG_DST_CLAMP | ZMODE_OPA | FORCE_BL |
+ GBL_c1(G_BL_CLR_IN, G_BL_0, G_BL_CLR_MEM, G_BL_A_MEM) |
+ GBL_c2(G_BL_CLR_IN, G_BL_0, G_BL_CLR_MEM, G_BL_A_MEM)),
- gsDPFillRectangle(0, 0, SCREEN_WIDTH-1, SCREEN_HEIGHT-1),
+ gsDPFillRectangle(0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1),
gsSPEndDisplayList(),
};
-Gfx D_8012AC58[] =
-{
+Gfx D_8012AC58[] = {
gsDPSetCombineLERP(K5, K5, 0, PRIMITIVE, 0, 0, 0, PRIMITIVE, K5, K5, 0, PRIMITIVE, 0, 0, 0, PRIMITIVE),
- gsDPSetOtherMode(
- G_AD_NOTPATTERN | G_CD_DISABLE | G_CK_NONE | G_TC_CONV | G_TF_POINT | G_TT_NONE | G_TL_TILE | G_TD_CLAMP |
- G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE,
- G_AC_NONE | G_ZS_PRIM | G_RM_CLD_SURF | G_RM_CLD_SURF2),
- gsDPFillRectangle(0, 0, SCREEN_WIDTH-1, SCREEN_HEIGHT-1),
- gsDPSetOtherMode(
- G_AD_PATTERN | G_CD_MAGICSQ | G_CK_NONE | G_TC_CONV | G_TF_POINT | G_TT_NONE | G_TL_TILE | G_TD_CLAMP |
- G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE,
- G_AC_NONE | G_ZS_PRIM | IM_RD | CVG_DST_CLAMP | ZMODE_OPA | FORCE_BL |
- GBL_c1(G_BL_CLR_IN, G_BL_0, G_BL_CLR_MEM, G_BL_A_MEM) |
- GBL_c2(G_BL_CLR_IN, G_BL_0, G_BL_CLR_MEM, G_BL_A_MEM)),
- gsDPFillRectangle(0, 0, SCREEN_WIDTH-1, SCREEN_HEIGHT-1),
+ gsDPSetOtherMode(G_AD_NOTPATTERN | G_CD_DISABLE | G_CK_NONE | G_TC_CONV | G_TF_POINT | G_TT_NONE | G_TL_TILE |
+ G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE,
+ G_AC_NONE | G_ZS_PRIM | G_RM_CLD_SURF | G_RM_CLD_SURF2),
+ gsDPFillRectangle(0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1),
+ gsDPSetOtherMode(G_AD_PATTERN | G_CD_MAGICSQ | G_CK_NONE | G_TC_CONV | G_TF_POINT | G_TT_NONE | G_TL_TILE |
+ G_TD_CLAMP | G_TP_NONE | G_CYC_1CYCLE | G_PM_NPRIMITIVE,
+ G_AC_NONE | G_ZS_PRIM | IM_RD | CVG_DST_CLAMP | ZMODE_OPA | FORCE_BL |
+ GBL_c1(G_BL_CLR_IN, G_BL_0, G_BL_CLR_MEM, G_BL_A_MEM) |
+ GBL_c2(G_BL_CLR_IN, G_BL_0, G_BL_CLR_MEM, G_BL_A_MEM)),
+ gsDPFillRectangle(0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1),
gsSPEndDisplayList(),
};
-//Init func
-void func_800ACE70(struct_801664F0* this)
-{
+// Init func
+void func_800ACE70(struct_801664F0* this) {
this->type = 0;
this->setScissor = false;
this->color.c.r = 0xFF;
@@ -78,15 +66,12 @@ void func_800ACE70(struct_801664F0* this)
this->color.c.a = 0xFF;
}
-//Destroy func
-void func_800ACE90(struct_801664F0* this)
-{
-
+// Destroy func
+void func_800ACE90(struct_801664F0* this) {
}
-//Update func
-void func_800ACE98(struct_801664F0* this, Gfx** gfxp)
-{
+// Update func
+void func_800ACE98(struct_801664F0* this, Gfx** gfxp) {
Gfx* gfx;
gfx = *gfxp;
@@ -94,37 +79,27 @@ void func_800ACE98(struct_801664F0* this, Gfx** gfxp)
gDPPipeSync(gfx++);
gDPSetPrimDepth(gfx++, -1, -1);
- if (this->setScissor == true)
- {
+ if (this->setScissor == true) {
gDPSetScissor(gfx++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
}
-
- switch(this->type)
- {
+
+ switch (this->type) {
case 1:
- {
gSPDisplayList(gfx++, D_8012AC40);
break;
- }
case 2:
- {
gDPSetColor(gfx++, G_SETPRIMCOLOR, this->color.rgba);
gSPDisplayList(gfx++, D_8012AC58);
break;
- }
case 3:
- {
gDPSetColor(gfx++, G_SETBLENDCOLOR, this->color.rgba);
gSPDisplayList(gfx++, D_8012AC00);
break;
- }
case 4:
- {
gDPSetColor(gfx++, G_SETFOGCOLOR, this->color.rgba);
gSPDisplayList(gfx++, D_8012AC28);
break;
- }
- }
+ }
gDPPipeSync(gfx++);
*gfxp = gfx;