Skip to content

Commit

Permalink
fragment5
Browse files Browse the repository at this point in the history
  • Loading branch information
Maide committed Sep 27, 2024
1 parent 1f22b01 commit 5f81ba3
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 12 deletions.
6 changes: 0 additions & 6 deletions include/variables.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,6 @@ extern u32 D_3008000;
extern u32 D_300C000;
extern u32 D_1003E78[];
extern u32 D_304F120[];
extern u16 D_87B000C0;
extern u16 D_87B000C4;
extern u8 D_87B000C8;
extern u8 D_87B000CC;
extern u8 D_87B000D0;
extern u8 D_87B000D4;

extern s32 D_800FC820;
extern u8* D_800FF9C0;
Expand Down
32 changes: 29 additions & 3 deletions src/fragments/5/fragment5.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,31 @@
#include "global.h"
#include "fragment5.h"
#include "src/20330.h"
#include "src/controller.h"

#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/5/fragment5/func_87B00020.s")
u16 D_87B000C0 = 0;
u16 D_87B000C4 = 0x0069;
u8 D_87B000C8 = 0;
u8 D_87B000CC = 0;
u8 D_87B000D0 = 0;
u8 D_87B000D4 = 0;

#pragma GLOBAL_ASM("asm/us/nonmatchings/fragments/5/fragment5/func_87B00050.s")
unk_D_800AC870* D_87B000E0;
unk_D_86002F30* D_87B000E4;
unk_D_86002F34* D_87B000E8;
unk_D_86002F34_00C* D_87B000EC;
s16 D_87B000F0;
s16 D_87B000F2;
s16 D_87B000F4;

void func_87B00020(void) {
Cont_StartReadInputs();
Cont_ReadInputs();
func_8001F730();
}

u32 func_87B00050(u32 arg0) {
if (arg0 == 0) {
return 0;
}
return ((guRandom() + osGetCount()) / 10) % arg0;
}
7 changes: 7 additions & 0 deletions src/fragments/5/fragment5.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@

#include "global.h"

extern u16 D_87B000C0;
extern u16 D_87B000C4;
extern u8 D_87B000C8;
extern u8 D_87B000CC;
extern u8 D_87B000D0;
extern u8 D_87B000D4;

extern unk_D_800AC870* D_87B000E0;
extern unk_D_86002F30* D_87B000E4;
extern unk_D_86002F34* D_87B000E8;
Expand Down
6 changes: 3 additions & 3 deletions yamls/us/rom.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@
- [0x11F580, c, fragments/4/fragment4]
- [0x120670, .data, fragments/4/fragment4]

- {vram: 0x87A01300, type: bss, name: fragments/4/fragment4_bss}
- {vram: 0x87A01300, type: .bss, name: fragments/4/fragment4}

- name: fragment4_relocs
type: code
Expand All @@ -684,9 +684,9 @@
subsegments:
- [0x120920, textbin, fragments/5/fragment5_header]
- [0x120940, c, fragments/5/fragment5]
- [0x1209E0, data, fragments/5/fragment5_data]
- [0x1209E0, .data, fragments/5/fragment5]

- {vram: 0x87B000E0, type: bss, name: fragments/5/fragment5_bss}
- {vram: 0x87B000E0, type: .bss, name: fragments/5/fragment5}

- name: fragment5_relocs
type: code
Expand Down

0 comments on commit 5f81ba3

Please sign in to comment.