Merge pull request #200 from Kelebek1/fragment75
Some checks failed
C/C++ CI / build (push) Has been cancelled

fragment75
This commit is contained in:
Maide 2025-05-01 02:28:44 +01:00 committed by GitHub
commit cb938d5a8f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 209 additions and 12 deletions

View File

@ -2,7 +2,6 @@
#include <PR/os_internal_reg.h>
#include "global.h"
#include "dp_intro.h"
#include "3FB0.h"
#include "5580.h"
#include "6BC0.h"
#include "crash_screen.h"

View File

@ -2,15 +2,27 @@
#define _SRC_DP_INTRO_H_
#include "global.h"
#include "3FB0.h"
void func_80001474(s8, s8);
void func_80001380(UnkStruct80001380* arg0);
void func_80001444(UnkStruct80001380* arg0, struct UnkArray4* arg1, s32 arg2);
void func_80001474(s8 arg0, s8 arg1);
void func_8000152C(struct UnkArray4* arg0);
void func_800015A8(void);
void func_800017E4(void);
void func_8000183C(UNUSED void* arg);
void func_800019C8(void);
void func_80001AD4(u16);
void func_80001AD4(u16 color);
u16 func_80001B2C(void);
s32 func_80001B40(void);
void func_80001B7C(void);
void func_80001BA8(void*);
void func_80001BD4(s32);
void func_80001BA8(void* arg0);
void func_80001BD4(s32 arg0);
void func_80001C1C(struct UnkArray4* arg0, u8 arg1, u8 arg2, u8 arg3, u8 arg4, s32 arg5, s32 arg6, s32 arg7);
s32 func_80001C58(void);
void func_80001C64(void);
s32 func_80001C90(void);
void func_80001CB8(void);
void func_80001CC8(void);
#endif /* _SRC_DP_INTRO_H_ */

View File

@ -1,9 +1,184 @@
#include "global.h"
#include "fragment75.h"
#include "src/19840.h"
#include "src/1CF30.h"
#include "src/30640.h"
#include "src/3FB0.h"
#include "src/6A40.h"
#include "src/C030.h"
#include "src/dp_intro.h"
#include "src/fragments/43/fragment43.h"
#include "src/memory.h"
#include "src/stage_loader.h"
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/75/fragment75/func_8FA00020.s")
static BinArchive* D_8FA00A20;
static u8* D_8FA00A24;
static BinArchive* D_8FA00A28;
static unk_func_80007444* D_8FA00A2C;
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/75/fragment75/func_8FA0047C.s")
static u8 D_8FA009F0[] = {
0x00, 0x11, 0x01, 0x02, 0x04, 0x06, 0x03, 0x0A, 0x0B, 0x07, 0x08, 0x09, 0x0C, 0x10, 0x0F, 0x14,
};
static unk_func_80031270* D_8FA00A00 = NULL;
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/75/fragment75/func_8FA00510.s")
void func_8FA00020(s32 arg0) {
func_800079C4();
#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/75/fragment75/func_8FA0051C.s")
gDPPipeSync(gDisplayListHead++);
gDPSetCycleType(gDisplayListHead++, G_CYC_FILL);
gDPSetRenderMode(gDisplayListHead++, G_RM_NOOP, G_RM_NOOP2);
gDPSetFillColor(gDisplayListHead++, 0xFFFFFFFF);
gDPFillRectangle(gDisplayListHead++, 0, 445, 639, 479);
if (arg0 == 3) {
gDPPipeSync(gDisplayListHead++);
gDPSetTexturePersp(gDisplayListHead++, G_TP_NONE);
gDPSetTextureFilter(gDisplayListHead++, G_TF_BILERP);
gDPSetTextureConvert(gDisplayListHead++, G_TC_FILT);
gDPSetTextureLOD(gDisplayListHead++, G_TL_TILE);
gDPSetTextureDetail(gDisplayListHead++, G_TD_CLAMP);
gDPSetCycleType(gDisplayListHead++, G_CYC_1CYCLE);
gDPSetPrimColor(gDisplayListHead++, 0, 0, 255, 255, 255, 255);
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_OPA_SURF, G_RM_AA_OPA_SURF2);
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEI_PRIM, G_CC_MODULATEI_PRIM);
gDPLoadTextureTile_4b(gDisplayListHead++, D_6000000, G_IM_FMT_I, 560, 0, 0, 0, 559, 8, 0,
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK,
G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(gDisplayListHead++, 0x00A0, 0x06F4, 0x0960, 0x0718, G_TX_RENDERTILE, 0, 0, 0x0400, 0x0400);
gDPLoadTextureTile_4b(gDisplayListHead++, D_6000000, G_IM_FMT_I, 560, 0, 0, 9, 559, 17, 0,
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK,
G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(gDisplayListHead++, 0x00A0, 0x0718, 0x0960, 0x073C, G_TX_RENDERTILE, 0, 0x0120, 0x0400,
0x0400);
}
}
void func_8FA0047C(s32 arg0) {
u32 sp24 = osGetCount();
u32 temp_s0 = __ull_div(__ll_mul(__ll_mul(arg0, 0x3E8), 0xBB8), 0x40) + sp24;
while (osGetCount() < temp_s0) {}
}
s32 func_8FA00510(void) {
return D_83407AE8;
}
s32 func_8FA0051C(s32 arg0, s32 arg1) {
s32 i;
unk_D_86002F58_004_000_010* temp_s0;
unk_func_80007444* temp_v0;
unk_D_83403C60* sp60 = (D_83407AE4 != 0) ? D_83407AC0 : D_83407ABC;
u8 sp50[] = {
0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x02, 0x02, 0x03, 0x03, 0x02, 0x02, 0x03, 0x03,
};
u8 var_v0;
u8 sp4E;
if (func_8FA00510() == 0) {
if (func_83400704(sp60, (D_83407AE4 != 0) ? 16 : 4, 0) != 0) {
func_8000B6FC(0x10);
return 0;
}
}
main_pool_push_state('SEAL');
func_8001E94C(0x10, 0);
func_80005E40(0x10000, 0);
temp_v0 = func_80007444(1, 0, 1, 0, 2, 1);
D_8FA00A2C = temp_v0;
ASSET_LOAD(D_1000000, common_menu1_ui, 0);
ASSET_LOAD(D_6000000, copyright, 0);
if (func_8FA00510() == 0) {
ASSET_LOAD(D_5000000, snap_mode_ui, 0);
FRAGMENT_LOAD(fragment31);
func_8001987C();
D_8FA00A28 = ASSET_LOAD2(stadium_models, 1, 1);
temp_s0 = func_80019760(5);
func_8002FF20();
D_8FA00A00 = func_80031270(0x280, 0x1E0, D_8FA00A2C->unk_18[0], NULL, temp_s0, D_8FA00A28, sp60);
}
func_80007678(temp_v0);
func_8000B6FC(1);
func_8FA0047C(0xC8);
func_80006C6C(1);
while (func_80007604() != 0) {
func_80007778();
}
osViBlack(1);
func_80001CB8();
sp4E = 0;
for (i = 0; i < 16; i++) {
if (func_8FA00510() == 0) {
if (D_83407AE4 != 0) {
var_v0 = i;
} else {
var_v0 = sp50[i];
}
if (sp4E != var_v0) {
D_8FA00A00->unk_18 = &sp60[var_v0];
D_8FA00A00->unk_00 = 0;
sp4E = var_v0;
}
main_pool_push_state('DRAW');
do {
func_80031660(D_8FA00A00);
} while (D_8FA00A00->unk_00 != 2);
func_8FA00020(i);
main_pool_pop_state('DRAW');
} else {
main_pool_push_state('DRAW');
D_8FA00A20 = ASSET_LOAD2(backgrounds, 1, 1);
D_8FA00A24 = func_8000484C(D_8FA00A20, D_8FA009F0[i]);
func_8001D924(D_8FA00A24);
func_8FA00020(i);
main_pool_pop_state('DRAW');
}
func_80007778();
while (func_80001C90() == 0) {}
osViBlack(0);
func_80001CC8();
func_8FA0047C(0xC8);
func_8000B6FC(2);
while (func_8000B6B4() == 8) {
func_8FA0047C(0xC8);
}
osViBlack(1);
func_80001CB8();
}
func_8000B6FC(4);
while (func_8000B6B4() == 8) {
func_8FA0047C(0x14);
}
func_80001CC8();
func_800076C0();
main_pool_pop_state('SEAL');
return 0;
}

View File

@ -0,0 +1,11 @@
#ifndef _FRAGMENT75_H_
#define _FRAGMENT75_H_
#include "global.h"
void func_8FA00020(s32 arg0);
void func_8FA0047C(s32 arg0);
s32 func_8FA00510(void);
s32 func_8FA0051C(s32 arg0, s32 arg1);
#endif // _FRAGMENT75_H_

View File

@ -2483,9 +2483,9 @@
subsegments:
- [0x3B8960, textbin, fragments/75/fragment75_header]
- [0x3B8980, c, fragments/75/fragment75]
- [0x3B9350, data, fragments/75/fragment75_data]
- [0x3B9350, .data, fragments/75/fragment75]
- {vram: 0x8FA00A20, type: bss, name: fragments/75/fragment75_bss}
- {vram: 0x8FA00A20, type: .bss, name: fragments/75/fragment75}
- name: fragment75_relocs
type: code