Skip to content

Commit

Permalink
Merge pull request pret#161 from Kelebek1/fragment21
Browse files Browse the repository at this point in the history
fragment21
  • Loading branch information
RevoSucks authored Oct 18, 2024
2 parents 5c689ff + 9541ed7 commit 3015ed2
Show file tree
Hide file tree
Showing 12 changed files with 2,674 additions and 114 deletions.
15 changes: 9 additions & 6 deletions include/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -418,14 +418,17 @@ typedef struct unk_D_86002F34_alt24 {

typedef void* (*func_unk_D_800ABE10)(s32, s32);

#define unk_D_86002F34_018_GFX_TYPE_1 1 // 8-bit per texel
#define unk_D_86002F34_018_GFX_TYPE_2 2 // 16-bit per texel
#define unk_D_86002F34_018_GFX_TYPE_3 3 // 32-bit per texel

typedef struct unk_D_86002F34_018 {
/* 0x00 */ u8 unk_00;
/* 0x01 */ u8 unk_01;
/* 0x02 */ u8 unk_02;
/* 0x03 */ u8 unk_03;
/* 0x04 */ s16 unk_04;
/* 0x06 */ s16 unk_06;
/* 0x08 */ u8* unk_08;
/* 0x01 */ u8 type;
/* 0x02 */ s16 width;
/* 0x04 */ s16 height;
/* 0x06 */ s16 num_texels;
/* 0x08 */ u8* texture;
} unk_D_86002F34_018; // size = 0xC

typedef struct unk_D_86002F34_01C {
Expand Down
6 changes: 6 additions & 0 deletions linker_scripts/us/undefined_syms.ld
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,9 @@ D_03042E00 = 0x03042E00;
D_0303ED80 = 0x0303ED80;
D_0303F580 = 0x0303F580;
D_0303F180 = 0x0303F180;
D_030451A0 = 0x030451A0;
D_03046AA0 = 0x03046AA0;
D_03045E20 = 0x03045E20;
D_03049020 = 0x03049020;
D_030483A0 = 0x030483A0;
D_03047720 = 0x03047720;
12 changes: 6 additions & 6 deletions src/19840.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@ void func_80018C40(unk_D_86002F34* arg0, arg1_func_80010CA8 arg1) {

for (i = 0; i < arg0->unk_24; i++, var_s2++) {
if (var_s2->unk_00 == 0) {
if (var_s2->unk_01 == 2) {
u16* var_s1 = var_s2->unk_08;
if (var_s2->type == unk_D_86002F34_018_GFX_TYPE_2) {
u16* var_s1 = var_s2->texture;

for (j = 0; j < var_s2->unk_06; j++) {
for (j = 0; j < var_s2->num_texels; j++) {
var_s1[j] = func_80010CA8(var_s1[j], arg1);
}
}

if (var_s2->unk_01 == 3) {
u32* var_s1 = var_s2->unk_08;
if (var_s2->type == unk_D_86002F34_018_GFX_TYPE_3) {
u32* var_s1 = var_s2->texture;

for (j = 0; j < var_s2->unk_06; j++) {
for (j = 0; j < var_s2->num_texels; j++) {
var_s1[j] = func_80010E20(var_s1[j], arg1);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/fragments/17/fragment17_161E60.c
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ static u32 D_86B0C4E0[] = {
};

static unk_D_86002F34_018 D_86B0CCE0 = {
0x03, 0x02, 0x00, 0x20, 0x0020, 0x0400, D_86B0C4E0,
0x03, unk_D_86002F34_018_GFX_TYPE_2, 32, 32, 0x0400, D_86B0C4E0,
};

static Gfx D_86B0CCF0[] = {
Expand Down Expand Up @@ -534,7 +534,7 @@ static u32 D_86B0CFE0[] = {
0x29EB3A71, 0x4B357439, 0x6BF7532F, 0x532B4AA9, 0x3A273229, 0x326F3AB3, 0x2A2B195D, 0x1919299D,
};
static unk_D_86002F34_018 D_86B0D7E0 = {
0x00, 0x02, 0x00, 0x20, 0x0020, 0x0400, D_86B0CFE0,
0x00, unk_D_86002F34_018_GFX_TYPE_2, 32, 32, 0x0400, D_86B0CFE0,
};
static Gfx D_86B0D7F0[] = {
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 0, 0x0000, G_TX_LOADTILE, 0, G_TX_MIRROR | G_TX_WRAP, 5, G_TX_NOLOD,
Expand Down
50 changes: 20 additions & 30 deletions src/fragments/18/fragment18.c
Original file line number Diff line number Diff line change
Expand Up @@ -915,90 +915,80 @@ static u32 D_86C0B1F8[] = {
static unk_D_86002F34_018 D_86C0B9F8[] = {
{
0x00,
0x02,
0x00,
0x20,
unk_D_86002F34_018_GFX_TYPE_2,
32,
64,
2048,
D_86C049F8,
},
{
0x00,
0x02,
0x00,
0x20,
unk_D_86002F34_018_GFX_TYPE_2,
32,
64,
2048,
D_86C059F8,
},
{
0x00,
0x02,
0x00,
0x20,
unk_D_86002F34_018_GFX_TYPE_2,
32,
64,
2048,
D_86C069F8,
},
{
0x00,
0x02,
0x00,
0x20,
unk_D_86002F34_018_GFX_TYPE_2,
32,
32,
1024,
D_86C079F8,
},
{
0x00,
0x03,
0x00,
0x20,
unk_D_86002F34_018_GFX_TYPE_3,
32,
32,
1024,
D_86C081F8,
},
{
0x00,
0x02,
0x00,
0x20,
unk_D_86002F34_018_GFX_TYPE_2,
32,
32,
1024,
D_86C091F8,
},
{
0x00,
0x02,
0x00,
0x20,
unk_D_86002F34_018_GFX_TYPE_2,
32,
32,
1024,
D_86C099F8,
},
{
0x00,
0x02,
0x00,
0x20,
unk_D_86002F34_018_GFX_TYPE_2,
32,
32,
1024,
D_86C0A1F8,
},
{
0x00,
0x02,
0x00,
0x20,
unk_D_86002F34_018_GFX_TYPE_2,
32,
32,
1024,
D_86C0A9F8,
},
{
0x00,
0x02,
0x00,
0x20,
unk_D_86002F34_018_GFX_TYPE_2,
32,
32,
1024,
D_86C0B1F8,
Expand Down
15 changes: 6 additions & 9 deletions src/fragments/20/fragment20.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,27 +155,24 @@ static u32 D_86E035B0[] = {
static unk_D_86002F34_018 D_86E03DB0[3] = {
{
0x04,
0x01,
0x00,
0x20,
unk_D_86002F34_018_GFX_TYPE_1,
32,
32,
1024,
D_86E02FB0,
},
{
0x00,
0x02,
0x00,
0x04,
unk_D_86002F34_018_GFX_TYPE_2,
4,
64,
256,
D_86E033B0,
},
{
0x00,
0x02,
0x00,
0x20,
unk_D_86002F34_018_GFX_TYPE_2,
32,
32,
1024,
D_86E035B0,
Expand Down
Loading

0 comments on commit 3015ed2

Please sign in to comment.