8000 fragment75 by Kelebek1 · Pull Request #200 · pret/pokestadium · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fragment75 #200

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/dp_intro.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
20 changes: 16 additions & 4 deletions src/dp_intro.h
Original file line number Diff line number Diff line change
Expand Up @@ -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_ */
185 changes: 180 additions & 5 deletions src/fragments/75/fragment75.c
Original file line number Diff line number Diff line change
@@ -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);
10000
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;
}
11 changes: 11 additions & 0 deletions src/fragments/75/fragment75.h
Original file line number Diff line number Diff line change
@@ -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_
4 changes: 2 additions & 2 deletions yamls/us/rom.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
0