1515
1616typedef bool32 (* VBlankProcessFunc )(void );
1717
18- // TODO: the order of these vars has
19- // been shuffled due to compilation losses.
20- // It's possible to use `ramscrgen` to reorder
21- // these variables in here and provide
22- // the matching order separately
2318IntrFunc gIntrTable [] = {};
2419u32 gIntrMainBuf [] = {};
2520struct Task gTasks [] = {};
@@ -37,7 +32,6 @@ u16 gVramHeapMaxTileSlots = 0;
3732u8 gNumHBlankCallbacks ALIGNED (4 ) = 0 ;
3833union MultiSioData gMultiSioRecv [4 ] = {};
3934#if (ENGINE == ENGINE_3 )
40- u8 gUnknown_03002BE0 [] = { 0 }; // unused?
4135u32 gUnknown_03002BF0 = 0 ;
4236#endif
4337u8 gNumHBlankIntrs = 0 ;
@@ -55,6 +49,9 @@ u16 SA2_LABEL(gUnknown_03001944) ALIGNED(4) = 0;
5549u8 gNumVBlankIntrs ALIGNED (4 ) = 0 ;
5650s16 SA2_LABEL (gUnknown_0300194C ) ALIGNED (4 ) = 0 ;
5751
52+ #if (ENGINE >= ENGINE_3 )
53+ u8 gUnknown_03002C60 ALIGNED (4 ) = 0 ;
54+ #endif
5855u32 gMultiSioStatusFlags = 0 ;
5956bool8 gMultiSioEnabled = FALSE;
6057
@@ -67,11 +64,21 @@ winreg_t gWinRegs[6] ALIGNED(16) = {};
6764s32 gNumTasks = 0 ;
6865u8 gBgSprites_Unknown2 [4 ][4 ] = {};
6966u16 gInput = 0 ;
67+ #if (ENGINE >= ENGINE_3 )
68+ s32 gUnknown_030035A4 = 0 ;
69+ struct Task * gNextTaskToCheckForDestruction = NULL ;
70+ #endif // (ENGINE >= ENGINE_3)
7071u8 gRepeatedKeysTestCounter [] ALIGNED (16 ) = {};
7172void * gBgOffsetsHBlankSecondary = NULL ;
7273u16 gBgCntRegs [] = {};
7374u16 gRepeatedKeys ALIGNED (4 ) = 0 ;
7475struct Task * gNextTask = NULL ;
76+ #if ((ENGINE == ENGINE_1 ) || (ENGINE == ENGINE_2 ))
77+ // Only here in SA3
78+ // struct GraphicsData *gVramGraphicsCopyQueue[];
79+ #else
80+ struct GraphicsData gVramGraphicsCopyQueue [] = {};
81+ #endif
7582#if (ENGINE == ENGINE_2 )
7683void * gBgOffsetsSecondary = NULL ;
7784#endif
@@ -93,10 +100,20 @@ u32 gFlagsPreVBlank = 0;
93100/* 0x03002794 */ const struct SpriteTables * gRefSpriteTables = NULL ;
94101
95102#if PORTABLE
96- struct GraphicsData gVramGraphicsCopyQueueBuffer [32 ] = {};
97- #endif
103+ // TODO: Once SA3 works in PORTABLE, it can just use
104+ // the regular gVramGraphicsCopyQueue[].
105+ struct GraphicsData gVramGraphicsCopyQueueBuffer [] = {};
106+ #endif // PORTABLE
107+ #if ((ENGINE == ENGINE_1 ) || (ENGINE == ENGINE_2 ))
98108struct GraphicsData * gVramGraphicsCopyQueue [] ALIGNED (16 ) = {};
109+ #else
110+ // NOT here in SA3
111+ // struct GraphicsData gVramGraphicsCopyQueue[32] = {};
112+ #endif
99113
114+ #if (ENGINE == ENGINE_3 )
115+ VoidFn gUnknown_03003C08 = NULL ;
116+ #endif
100117s16 SA2_LABEL (gUnknown_03002820 ) = 0 ;
101118s16 gBgScrollRegs [][2 ] ALIGNED (16 ) = {};
102119u16 gDispCnt = 0 ;
@@ -106,6 +123,11 @@ u8 SA2_LABEL(gUnknown_03002874) = 0;
106123
107124void * gHBlankCopyTarget ALIGNED (4 ) = NULL ;
108125
126+ #if (ENGINE == ENGINE_3 )
127+ // Name inferred from KATAM
128+ u16 gRgbMap [3 ][2 * 16 ] __attribute__((aligned (4 ))) = {};
129+ #endif // (ENGINE == ENGINE_3)
130+
109131u8 gBackgroundsCopyQueueIndex = 0 ;
110132u16 gBgPalette [] ALIGNED (16 ) = {};
111133
@@ -131,6 +153,9 @@ void *gBgOffsetsPrimary = NULL;
131153#endif
132154u16 SA2_LABEL (gUnknown_03004D58 ) ALIGNED (4 ) = 0 ;
133155u8 gVramGraphicsCopyCursor ALIGNED (4 ) = 0 ;
156+ #if (ENGINE == ENGINE_3 )
157+ u8 gUnknown_0300620C ALIGNED (4 ) = 0 ;
158+ #endif
134159u8 gOamMallocOrders_EndIndex [] ALIGNED (16 ) = {};
135160u8 gBgSprites_Unknown1 [] = {};
136161OamData gOamBuffer [] ALIGNED (16 ) = {};
0 commit comments