Skip to content

Commit b000864

Browse files
committed
sharedFunc_800CFFF8_0_s00 for all maps
1 parent fb7b4ac commit b000864

13 files changed

Lines changed: 35 additions & 13 deletions

File tree

configs/USA/maps/sym.map4_s02.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ sharedData_800DD584_0_s00 = 0x800EAD33; // type:u8
161161
sharedData_800DD588_0_s00 = 0x800EAD34; // type:s32
162162
sharedData_800DD58C_0_s00 = 0x800EAD38; // type:s32
163163
sharedData_800DF158_1_s02 = 0x800EAD3C; // type:u8
164+
sharedData_800DD591_0_s00 = 0x800EAD3D; // type:u8
164165
sharedData_800DD598_0_s00 = 0x800EAD40;
165166
sharedData_800DD59C_0_s00 = 0x800EAD44; // type:u8
166167
sharedData_800DD7A0_0_s01 = 0x800EAD48; // size:0xD0

configs/USA/sym.bodyprog.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,12 @@ INVENTORY_ITEM_ROTATIONS = 0x800262FC; // type:DVECTOR size:0
8383
//--------------------------------------------------------------------------
8484
hack_D_80028A18_fix = 0x80028A18; // type:s32
8585

86+
//------------------------------------------------------
87+
//--- PA: 0x004BEC VA: 0x8002974C subsegment: rodata
88+
//------------------------------------------------------
89+
8690
//--------------------------------------------------------------------------
87-
//--- PA: 0x004034 VA: 0x80028B94 subsegment: .rodata, bodyprog_800706E4
91+
//--- PA: 0x004BF0 VA: 0x80029750 subsegment: .rodata, bodyprog_800706E4
8892
//--------------------------------------------------------------------------
8993

9094
//--------------------------------------------------------------------------

include/maps/shared/sharedFunc_800CFFF8_0_s00.h

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,39 @@ void sharedFunc_800CFFF8_0_s00(s32 pass, s_func_800CFFF8* part, s16* rand)
44
s32 threshold;
55
#if defined(MAP7_S03)
66
#define PASS_ADD 8
7+
#elif defined(MAP1_S06)
8+
#define PASS_ADD 6
79
#else
810
#define PASS_ADD 5
911
#endif
1012

13+
#if !defined(MAP1_S03) && !defined(MAP1_S02) && !defined(MAP4_S04) && \
14+
!defined(MAP4_S02) && !defined(MAP4_S05) && !defined(MAP4_S03) && \
15+
!defined(MAP5_S00) && !defined(MAP6_S03)
16+
#define CODE_BLOCK1
17+
#endif
18+
19+
#if !defined(MAP7_S03) && !defined(MAP1_S03) && !defined(MAP1_S00) && \
20+
!defined(MAP1_S02) && !defined(MAP4_S04) && !defined(MAP4_S05) && \
21+
!defined(MAP5_S00) && !defined(MAP6_S00) && !defined(MAP6_S03)
22+
#define CODE_BLOCK2
23+
#endif
24+
1125
part->field_0.vx += g_Particle_PrevPosition.vx - g_Particle_Position.vx;
1226
part->field_0.vz += g_Particle_PrevPosition.vz - g_Particle_Position.vz;
1327
#if defined(MAP7_S03)
1428
part->field_0.vz += ((g_Particle_PrevPosition.vz - g_Particle_Position.vz) - D_800F23D0);
1529
#endif
1630

17-
#if !defined(MAP1_S03)
31+
#if defined(CODE_BLOCK1)
1832
if (pass == 0 && sharedData_800E0CAC_0_s00 == 3)
1933
{
2034
part->field_0.vx += FP_FROM(g_Particle_SpeedX, Q4_SHIFT);
2135
part->field_0.vz += FP_FROM(g_Particle_SpeedZ, Q4_SHIFT);
2236
}
2337
#endif
2438

25-
#if !defined(MAP7_S03) && !defined(MAP1_S03)
39+
#if defined(CODE_BLOCK2)
2640
if (sharedData_800DD591_0_s00 != 0)
2741
{
2842
return;
@@ -48,4 +62,7 @@ void sharedFunc_800CFFF8_0_s00(s32 pass, s_func_800CFFF8* part, s16* rand)
4862
part->field_C.vx = part->field_0.vx;
4963
part->field_C.vz = part->field_0.vz;
5064
}
65+
#undef CODE_BLOCK1
66+
#undef CODE_BLOCK2
5167
}
68+

src/maps/map1_s00/map1_s00.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ INCLUDE_RODATA("asm/maps/map1_s00/nonmatchings/map1_s00", g_MapOverlayHeader);
2424

2525
INCLUDE_ASM("asm/maps/map1_s00/nonmatchings/map1_s00", sharedFunc_800CEFD0_1_s02); // 0x800CCA64
2626

27-
INCLUDE_ASM("asm/maps/map1_s00/nonmatchings/map1_s00", sharedFunc_800CFFF8_0_s00); // 0x800CCE2C
27+
#include "maps/shared/sharedFunc_800CFFF8_0_s00.h" // 0x800CCE2C
2828

2929
#include "maps/shared/sharedFunc_800CE954_7_s03.h" // 0x800CCF40
3030

src/maps/map1_s02/map1_s02.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ INCLUDE_ASM("asm/maps/map1_s02/nonmatchings/map1_s02", sharedFunc_800CEFF4_0_s00
3333

3434
#include "maps/shared/sharedFunc_800CEFD0_1_s02.h" // 0x800CEFD0
3535

36-
INCLUDE_ASM("asm/maps/map1_s02/nonmatchings/map1_s02", sharedFunc_800CFFF8_0_s00); // 0x800CF2B4
36+
#include "maps/shared/sharedFunc_800CFFF8_0_s00.h" // 0x800CF2B4
3737

3838
#include "maps/shared/sharedFunc_800CE954_7_s03.h" // 0x800CF374
3939

src/maps/map1_s06/map1_s06.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ INCLUDE_ASM("asm/maps/map1_s06/nonmatchings/map1_s06", func_800CC078);
3535

3636
INCLUDE_ASM("asm/maps/map1_s06/nonmatchings/map1_s06", sharedFunc_800CEFD0_1_s02); // 0x800CDC4C
3737

38-
INCLUDE_ASM("asm/maps/map1_s06/nonmatchings/map1_s06", sharedFunc_800CFFF8_0_s00); // 0x800CDFE8
38+
#include "maps/shared/sharedFunc_800CFFF8_0_s00.h" // 0x800CDFE8
3939

4040
#include "maps/shared/sharedFunc_800CE954_7_s03.h" // 0x800CE114
4141

src/maps/map4_s02/map4_s02.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ INCLUDE_ASM("asm/maps/map4_s02/nonmatchings/map4_s02", sharedFunc_800CEFF4_0_s00
2222

2323
#include "maps/shared/sharedFunc_800CEFD0_1_s02.h" // 0x800CDF74
2424

25-
INCLUDE_ASM("asm/maps/map4_s02/nonmatchings/map4_s02", sharedFunc_800CFFF8_0_s00); // 0x800CE258
25+
#include "maps/shared/sharedFunc_800CFFF8_0_s00.h" // 0x800CE258
2626

2727
INCLUDE_ASM("asm/maps/map4_s02/nonmatchings/map4_s02", sharedFunc_800D0690_1_s03); // 0x800CE32C
2828

src/maps/map4_s03/map4_s03.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ INCLUDE_ASM("asm/maps/map4_s03/nonmatchings/map4_s03", sharedFunc_800CEFF4_0_s00
3131

3232
#include "maps/shared/sharedFunc_800CEFD0_1_s02.h" // 0x800CDD74
3333

34-
INCLUDE_ASM("asm/maps/map4_s03/nonmatchings/map4_s03", sharedFunc_800CFFF8_0_s00); // 0x800CE058
34+
#include "maps/shared/sharedFunc_800CFFF8_0_s00.h" // 0x800CE058
3535

3636
#include "maps/shared/sharedFunc_800CE954_7_s03.h" // 0x800CE12C
3737

src/maps/map4_s04/map4_s04.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ INCLUDE_ASM("asm/maps/map4_s04/nonmatchings/map4_s04", sharedFunc_800CEFF4_0_s00
2323

2424
#include "maps/shared/sharedFunc_800CEFD0_1_s02.h" // 0x800CD1FC
2525

26-
INCLUDE_ASM("asm/maps/map4_s04/nonmatchings/map4_s04", sharedFunc_800CFFF8_0_s00); // 0x800CD4E0
26+
#include "maps/shared/sharedFunc_800CFFF8_0_s00.h" // 0x800CD4E0
2727

2828
INCLUDE_ASM("asm/maps/map4_s04/nonmatchings/map4_s04", sharedFunc_800D0690_1_s03); // 0x800CD5A0
2929

src/maps/map4_s05/map4_s05.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ INCLUDE_ASM("asm/maps/map4_s05/nonmatchings/map4_s05", sharedFunc_800CEFF4_0_s00
3535

3636
#include "maps/shared/sharedFunc_800CEFD0_1_s02.h" // 0x800CE018
3737

38-
INCLUDE_ASM("asm/maps/map4_s05/nonmatchings/map4_s05", sharedFunc_800CFFF8_0_s00); // 0x800CE2FC
38+
#include "maps/shared/sharedFunc_800CFFF8_0_s00.h" // 0x800CE2FC
3939

4040
INCLUDE_ASM("asm/maps/map4_s05/nonmatchings/map4_s05", sharedFunc_800D0690_1_s03); // 0x800CE3BC
4141

0 commit comments

Comments
 (0)