mirror of
https://github.com/SAT-R/sa2.git
synced 2026-10-28 09:43:38 +00:00
struct Camera -> Camera, improve camera definitions, clean up structs
This commit is contained in:
1 parent
03db3c919a
commit
11908e6168
67 files changed
+233
-266
No files matched your search
+1
-1
@@ -43,7 +43,7 @@ u16 Random(void);
|
||||
// Returns a 32-bit pseudorandom number
|
||||
#define Random32() ((Random() << 16) | Random())
|
||||
|
||||
#define ShuffleRngSeed() \
|
||||
#define SHUFFLE_RNG_SEED() \
|
||||
({ \
|
||||
u32 rand1, rand2, rand3; \
|
||||
rand1 ^= (Random() << 16); \
|
||||
|
||||
@@ -30,83 +30,52 @@ typedef void (*BgUpdate)(s32, s32);
|
||||
|
||||
// NOTE: This was copy-pasted from SA2.
|
||||
// There are type differences for members
|
||||
typedef struct Camera {
|
||||
typedef struct {
|
||||
/* 0x00|0x04 */ CamCoord x; // TODO: might this be unsigned actually?
|
||||
/* 0x02|0x04 */ CamCoord y; // TODO: might this be unsigned actually?
|
||||
#if (GAME == GAME_SA1)
|
||||
/* 0x04 */ s16 SA2_LABEL(unk8);
|
||||
/* 0x06 */ s16 SA2_LABEL(unkC);
|
||||
/* 0x04 */ CamCoord SA2_LABEL(unk8);
|
||||
/* 0x06 */ CamCoord SA2_LABEL(unkC);
|
||||
/* 0x08 */ CamCoord SA2_LABEL(unk10);
|
||||
/* 0x0A */ CamCoord SA2_LABEL(unk14);
|
||||
/* 0x0C */ s16 shiftX;
|
||||
/* 0x0E */ s16 shiftY;
|
||||
/* 0x10 */ s16 SA2_LABEL(unk20);
|
||||
/* 0x12 */ s16 SA2_LABEL(unk24);
|
||||
|
||||
/* 0x18 */ CamCoord shiftX;
|
||||
/* 0x1C */ CamCoord shiftY;
|
||||
/* 0x20 */ CamCoord SA2_LABEL(unk20);
|
||||
/* 0x12 */ CamCoord SA2_LABEL(unk24);
|
||||
// TODO: Why are X/Y swapped?
|
||||
// Did they make this a matrix or sth.?
|
||||
// (Used to calc min/max cam pos in UpdateCamera())
|
||||
/* 0x14 */ s16 minY;
|
||||
/* 0x16 */ s16 maxY;
|
||||
/* 0x18 */ s16 minX;
|
||||
/* 0x1A */ s16 maxX;
|
||||
/* 0x28 */ CamCoord minY;
|
||||
/* 0x2c */ CamCoord maxY;
|
||||
/* 0x30 */ CamCoord minX;
|
||||
/* 0x34 */ CamCoord maxX;
|
||||
#if (GAME == GAME_SA2)
|
||||
/* 0x38 */ CamCoord dx;
|
||||
/* 0x3c */ CamCoord dy;
|
||||
#endif
|
||||
/* 0x1C */ s16 SA2_LABEL(unk40);
|
||||
/* 0x1E */ s16 SA2_LABEL(unk44);
|
||||
/* 0x20 */ s16 SA2_LABEL(unk48);
|
||||
/* 0x22 */ s16 SA2_LABEL(unk4C);
|
||||
/* 0x1E */ CamCoord SA2_LABEL(unk44);
|
||||
/* 0x20 */ CamCoord SA2_LABEL(unk48);
|
||||
/* 0x22 */ CamCoord SA2_LABEL(unk4C);
|
||||
#if (GAME == GAME_SA1)
|
||||
/* 0x24 */ u16 unk24;
|
||||
#endif
|
||||
// 0x4 = spectator
|
||||
// mode
|
||||
/* 0x26 */ u16 SA2_LABEL(unk50);
|
||||
/* 0x28 */ u16 SA2_LABEL(unk52);
|
||||
/* 0x2A */ u16 SA2_LABEL(unk54);
|
||||
#if (GAME == GAME_SA2)
|
||||
/* 0x56 */ s16 unk56;
|
||||
#endif
|
||||
/* 0x2C */ BgUpdate fnBgUpdate;
|
||||
/* 0x30 */ struct Task *movementTask;
|
||||
/* 0x34 */ s16 shakeOffsetX;
|
||||
/* 0x36 */ s16 shakeOffsetY;
|
||||
/* 0x38 */ s16 SA2_LABEL(unk64);
|
||||
/* 0x3A */ u8 spectatorTarget;
|
||||
/* 0x3B */ u8 filler3B[0x2];
|
||||
#elif (GAME == GAME_SA2)
|
||||
/* 0x08 */ s32 unk8;
|
||||
/* 0x0C */ s32 unkC;
|
||||
/* 0x10 */ s32 unk10;
|
||||
/* 0x14 */ s32 unk14;
|
||||
/* 0x18 */ s32 shiftX;
|
||||
/* 0x1C */ s32 shiftY;
|
||||
/* 0x20 */ s32 unk20;
|
||||
/* 0x24 */ s32 unk24;
|
||||
|
||||
// TODO: Why are X/Y swapped?
|
||||
// Did they make this a matrix or sth.?
|
||||
// (Used to calc min/max cam pos in UpdateCamera())
|
||||
/* 0x28 */ s32 minY;
|
||||
/* 0x2c */ s32 maxY;
|
||||
/* 0x30 */ s32 minX;
|
||||
/* 0x34 */ s32 maxX;
|
||||
|
||||
/* 0x38 */ s32 dx;
|
||||
/* 0x3c */ s32 dy;
|
||||
/* 0x40 */ s16 unk40;
|
||||
/* 0x44 */ s32 unk44;
|
||||
/* 0x48 */ s32 unk48;
|
||||
/* 0x4c */ s32 unk4C;
|
||||
|
||||
// 0x4 = spectator
|
||||
// mode
|
||||
/* 0x50 */ u16 unk50;
|
||||
|
||||
/* 0x52 */ u16 SA2_LABEL(unk52);
|
||||
/* 0x54 */ u16 SA2_LABEL(unk54);
|
||||
/* 0x56 */ s16 SA2_LABEL(unk56);
|
||||
/* 0x58 */ BgUpdate fnBgUpdate;
|
||||
/* 0x5C */ struct Task *movementTask;
|
||||
/* 0x60 */ s16 shakeOffsetX;
|
||||
/* 0x62 */ s16 shakeOffsetY;
|
||||
/* 0x64 */ s16 unk64;
|
||||
/* 0x66 */ u8 spectatorTarget;
|
||||
#endif
|
||||
} Camera; /* size 0x80(in SA2) */
|
||||
|
||||
extern struct Camera gCamera;
|
||||
extern Camera gCamera;
|
||||
|
||||
// TODO: Merge all these into one!
|
||||
#define IS_OUT_OF_RANGE_2(x, y, radiusX, radiusY) \
|
||||
@@ -157,12 +126,12 @@ extern struct Camera gCamera;
|
||||
#define CAM_SCREENBASE_MAP_BACK 56
|
||||
#endif
|
||||
|
||||
struct Backgrounds {
|
||||
typedef struct {
|
||||
Background unk0;
|
||||
Background unk40;
|
||||
Background unk80;
|
||||
Background unkC0;
|
||||
};
|
||||
} StageBackgrounds;
|
||||
|
||||
extern const Background gStageCameraBgTemplates[4];
|
||||
|
||||
@@ -180,12 +149,7 @@ void HBlankCB_BgUpdateZone5ActBoss(int_vcount vcount);
|
||||
void HBlankCB_BgUpdateZoneFinalActXX(int_vcount vcount);
|
||||
#endif
|
||||
|
||||
#if (GAME == GAME_SA1)
|
||||
// TODO: should be included from terrain_collision.h
|
||||
extern const Collision *gRefCollision;
|
||||
#endif
|
||||
|
||||
extern const u16 gBossCameraYClamps[][2];
|
||||
extern struct Backgrounds gStageBackgroundsRam;
|
||||
extern StageBackgrounds gStageBackgroundsRam;
|
||||
|
||||
#endif // GUARD_GAME_STAGE_CAMERA_H
|
||||
@@ -28,7 +28,7 @@ typedef enum PakModes {
|
||||
PM_COUNT
|
||||
} PakModes;
|
||||
|
||||
typedef struct ModeSelect {
|
||||
typedef struct {
|
||||
/* 0x00 */ Background bg;
|
||||
/* 0x40 */ Sprite s[3];
|
||||
/* 0xD0 */ Sprite s4;
|
||||
|
||||
@@ -36,7 +36,7 @@ typedef enum PakModes {
|
||||
PM_COUNT
|
||||
} PakModes;
|
||||
|
||||
typedef struct ModeSelect {
|
||||
typedef struct {
|
||||
/* 0x00 */ Background bg;
|
||||
/* 0x40 */ Sprite s[3];
|
||||
/* 0xD0 */ Sprite s4;
|
||||
@@ -60,7 +60,7 @@ typedef struct ModeSelect {
|
||||
/* 0x219 */ u8 unk219;
|
||||
} ModeSelect; /* 0x21C */
|
||||
|
||||
typedef struct SioMultiplayerScore {
|
||||
typedef struct {
|
||||
u16 unk0;
|
||||
u8 unk2;
|
||||
u8 unk3;
|
||||
@@ -81,7 +81,7 @@ void Task_800F058(void);
|
||||
|
||||
extern const VoidFn gUnknown_080BB3F8[9];
|
||||
|
||||
void sa2__sub_80818B8(void)
|
||||
void SA2_LABEL(sub_80818B8)(void)
|
||||
{
|
||||
u32 var_r1;
|
||||
u8 temp_r4_3;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "constants/sa1/songs.h"
|
||||
#include "constants/sa1/text.h" // for UILANG_COUNT
|
||||
|
||||
typedef struct OptionsMenu {
|
||||
typedef struct {
|
||||
/* 0x000 */ Sprite s0;
|
||||
/* 0x030 */ Sprite sprites30[8];
|
||||
/* 0x1B0 */ Sprite s1B0;
|
||||
|
||||
@@ -21,7 +21,7 @@ typedef enum EPDM_Options {
|
||||
PDM_OPTION_COUNT
|
||||
} EPDM_Options;
|
||||
|
||||
typedef struct PlayerDataMenu {
|
||||
typedef struct {
|
||||
/* 0x00 */ Sprite s;
|
||||
/* 0x30 */ Sprite s2[PDM_OPTION_COUNT + 1];
|
||||
/* 0xF0 */ StrcUi_805423C strcF0;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "constants/sa1/songs.h"
|
||||
#include "constants/sa1/text.h"
|
||||
|
||||
typedef struct TimeAttackMenu {
|
||||
typedef struct {
|
||||
StrcUi_805423C unk0;
|
||||
Sprite s;
|
||||
Sprite s2;
|
||||
|
||||
@@ -70,18 +70,18 @@ const u8 gUnknown_080BB327[] = { 0, 1, 3, 2, 0 };
|
||||
const VoidFn sMainMenuSecondaryItems[NUM_MAIN_MENU_ITEMS - 1]
|
||||
= { CreateMultiplayerModeSelectScreen, CreateTimeAttackMenu, CreateOptionsMenu, LoadTinyChaoGarden };
|
||||
|
||||
typedef struct SegaLogo {
|
||||
typedef struct {
|
||||
u16 unk0;
|
||||
Background bg;
|
||||
} SegaLogo; /* 0x44 */
|
||||
|
||||
typedef struct SonicTeamLogo {
|
||||
typedef struct {
|
||||
u16 unk0;
|
||||
Background bg;
|
||||
s16 qFade;
|
||||
} SonicTeamLogo; /* 0x48 */
|
||||
|
||||
typedef struct MainMenu {
|
||||
typedef struct {
|
||||
/* 0x000 */ Sprite s;
|
||||
/* 0x030 */ Sprite items[NUM_MAIN_MENU_ITEMS];
|
||||
/* 0x120 */ Background bg120;
|
||||
@@ -324,7 +324,7 @@ void Task_800D4B0(void)
|
||||
CreateTitleScreen(1);
|
||||
}
|
||||
|
||||
typedef struct TitleScreen {
|
||||
typedef struct {
|
||||
/* 0x00 */ Sprite s;
|
||||
/* 0x30 */ Sprite s2;
|
||||
/* 0x60 */ Background bg;
|
||||
@@ -514,7 +514,7 @@ void CreateMainMenu(u32 param0)
|
||||
s8 *temp_r0;
|
||||
|
||||
struct Task *t;
|
||||
struct MainMenu *menu;
|
||||
MainMenu *menu;
|
||||
Sprite *s;
|
||||
Background *bg;
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#define CM_BACKGROUND_COLOR RGB16_REV(0, 27, 30)
|
||||
|
||||
typedef struct ChaoMessage {
|
||||
typedef struct {
|
||||
/* 0x00 */ Background bg;
|
||||
/* 0x40 */ u8 unk40[2][4];
|
||||
/* 0x48 */ s16 unk48[4];
|
||||
@@ -29,14 +29,14 @@ typedef struct ChaoMessage {
|
||||
/* 0x56 */ u8 unk56;
|
||||
} ChaoMessage; /* 0x58 */
|
||||
|
||||
typedef struct ChaoMsgSprite {
|
||||
typedef struct {
|
||||
/* 0x00 */ Sprite s;
|
||||
/* 0x30 */ s16 unk30;
|
||||
/* 0x32 */ s16 unk32;
|
||||
/* 0x34 */ u8 unk34;
|
||||
} ChaoMsgSprite; /* 0x38 */
|
||||
|
||||
typedef struct ChaoMsg68 {
|
||||
typedef struct {
|
||||
GameOverB overBs[4];
|
||||
s16 unk60;
|
||||
s16 unk62;
|
||||
|
||||
@@ -20,7 +20,7 @@ extern struct MP2KSongHeader se_ring_copy;
|
||||
#include "constants/sa1/songs.h"
|
||||
#include "constants/sa1/zones.h"
|
||||
|
||||
typedef struct Strc_30055E0 {
|
||||
typedef struct {
|
||||
u8 unk0;
|
||||
s16 unk2;
|
||||
u16 qBlend;
|
||||
@@ -28,7 +28,7 @@ typedef struct Strc_30055E0 {
|
||||
u8 fillerC[0x4];
|
||||
} Strc_30055E0; /* 0x10 */
|
||||
|
||||
typedef struct Strc_3005690 {
|
||||
typedef struct {
|
||||
s32 unk0;
|
||||
s32 unk4;
|
||||
s32 unk8;
|
||||
@@ -76,7 +76,7 @@ typedef struct Strc_3005690 {
|
||||
u8 filler56[0xA];
|
||||
} Strc_3005690; /* 0x60 */
|
||||
|
||||
typedef struct Strc_3005780 {
|
||||
typedef struct {
|
||||
s16 unk0;
|
||||
s16 unk2;
|
||||
s16 unk4;
|
||||
@@ -90,7 +90,7 @@ typedef struct Strc_3005780 {
|
||||
s8 unk13;
|
||||
} Strc_3005780;
|
||||
|
||||
typedef struct SpStage74 {
|
||||
typedef struct {
|
||||
SpriteTransform tf;
|
||||
Sprite s;
|
||||
s32 unk3C;
|
||||
@@ -123,7 +123,7 @@ typedef struct SpStage74 {
|
||||
u8 filler72[2];
|
||||
} SpStage74;
|
||||
|
||||
typedef struct SpStage8 {
|
||||
typedef struct {
|
||||
u8 filler0[2];
|
||||
u16 unk2;
|
||||
u16 unk4;
|
||||
@@ -131,14 +131,14 @@ typedef struct SpStage8 {
|
||||
} SpStage8;
|
||||
|
||||
// Stage layouts?
|
||||
typedef struct SpStageC {
|
||||
typedef struct {
|
||||
s16 unk0;
|
||||
s16 unk2;
|
||||
s32 unk4;
|
||||
u16 unk8;
|
||||
} SpStageC; /* 0x0C */
|
||||
|
||||
typedef struct SpStage40 {
|
||||
typedef struct {
|
||||
SpriteTransform tf;
|
||||
Sprite s;
|
||||
void *mem;
|
||||
@@ -225,7 +225,7 @@ extern void sub_8068D0C();
|
||||
|
||||
extern void SetPlayerControls(bool32 flipFaceButtons);
|
||||
|
||||
typedef struct TfSprite {
|
||||
typedef struct {
|
||||
SpriteTransform tf;
|
||||
Sprite s;
|
||||
} TfSprite;
|
||||
@@ -343,7 +343,7 @@ const Background gUnknown_084870F4 = {
|
||||
.prevScrollY = 0x7FFF,
|
||||
};
|
||||
|
||||
typedef struct HitboxS16 {
|
||||
typedef struct {
|
||||
s16 left;
|
||||
s16 top;
|
||||
s16 right;
|
||||
@@ -2014,7 +2014,7 @@ void sub_802C0CC(void)
|
||||
x = (strc5690->unkC - strc74->unk4C);
|
||||
y = (strc5690->unkE - strc74->unk4E);
|
||||
|
||||
theta = sa2__sub_8004418(y, x);
|
||||
theta = SA2_LABEL(sub_8004418)(y, x);
|
||||
strc74->unk52 += 0x15;
|
||||
v0 = (strc74->unk52 * COS(theta));
|
||||
v1 = (SIN(theta));
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
void StageBgUpdate_Zone1Acts12(s32 x, s32 UNUSED y)
|
||||
{
|
||||
struct Camera *cam = &gCamera;
|
||||
Camera *cam = &gCamera;
|
||||
Background *bg;
|
||||
u16 *offsets;
|
||||
s32 i;
|
||||
|
||||
@@ -36,7 +36,7 @@ void Task_UpdateFireworkAnimation(void)
|
||||
{
|
||||
CasinoParadiseFirework *firework = TASK_DATA(gCurTask);
|
||||
Sprite *s = &firework->s;
|
||||
struct Camera *cam = &gCamera;
|
||||
Camera *cam = &gCamera;
|
||||
|
||||
if (s->frameFlags & SPRITE_FLAG_MASK_ANIM_OVER) {
|
||||
TaskDestroy(gCurTask);
|
||||
@@ -66,7 +66,7 @@ void Task_UpdateFireworkAnimation(void)
|
||||
|
||||
void StageBgUpdate_Zone3Acts12(s32 x, s32 y)
|
||||
{
|
||||
struct Camera *cam = &gCamera;
|
||||
Camera *cam = &gCamera;
|
||||
const Collision *collision;
|
||||
s32 xSub, ySub;
|
||||
s32 scanline;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
void StageBgUpdate_Zone4Acts12(s32 x, s32 y)
|
||||
{
|
||||
struct Camera *cam = &gCamera;
|
||||
Camera *cam = &gCamera;
|
||||
Background *bg;
|
||||
u16 *offsets;
|
||||
const Collision *coll;
|
||||
|
||||
@@ -222,7 +222,7 @@ void StageBgUpdate_Zone6Act1(s32 x, s32 y)
|
||||
|
||||
void StageBgUpdate_Zone6Act2(s32 x, s32 y)
|
||||
{
|
||||
struct Camera *cam = &gCamera;
|
||||
Camera *cam = &gCamera;
|
||||
const Collision *coll;
|
||||
#ifndef NON_MATCHING
|
||||
register s32 xSub asm("r9");
|
||||
|
||||
@@ -11,7 +11,7 @@ extern void VBlankCallback_803F920(void);
|
||||
|
||||
void StageBgUpdate_Zone7Act2(s32 x, s32 y)
|
||||
{
|
||||
struct Camera *cam = &gCamera;
|
||||
Camera *cam = &gCamera;
|
||||
Background *bg = &gStageBackgroundsRam.unkC0;
|
||||
const Collision *collision;
|
||||
u32 *offsets;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "constants/sa1/anim_sizes.h"
|
||||
#include "constants/sa1/songs.h"
|
||||
|
||||
typedef struct EHTArm {
|
||||
typedef struct {
|
||||
/* 0x00 */ Sprite s;
|
||||
/* 0x30 */ SpriteTransform transform;
|
||||
/* 0x3C */ s16 unk3C;
|
||||
@@ -29,7 +29,7 @@ typedef struct EHTArm {
|
||||
/* 0x50 */ u8 unk50;
|
||||
} EHTArm; /* 0x54 */
|
||||
|
||||
typedef struct EHTHammer {
|
||||
typedef struct {
|
||||
/* 0x00 */ Sprite s;
|
||||
/* 0x30 */ SpriteTransform transform;
|
||||
/* 0x3C */ s16 unk3C;
|
||||
@@ -43,7 +43,7 @@ typedef struct EHTHammer {
|
||||
/* 0x50 */ u8 unk50;
|
||||
} EHTHammer; /* 0x54 */
|
||||
|
||||
typedef struct EggHammerTank {
|
||||
typedef struct {
|
||||
/* 0x00 */ SpriteBase base;
|
||||
/* 0x0C */ Sprite s;
|
||||
/* 0x3C */ Hitbox reserved;
|
||||
@@ -1041,7 +1041,7 @@ void Task_80272D0(void)
|
||||
arm->qUnk48 += arm->qUnk4E;
|
||||
|
||||
if (arm->qUnk4E > 0) {
|
||||
s32 res = sa2__sub_801F100(arm->unk3E + I(arm->qUnk48), arm->unk3C + I(arm->qUnk44), 1, 8, sa2__sub_801EC3C);
|
||||
s32 res = SA2_LABEL(sub_801F100)(arm->unk3E + I(arm->qUnk48), arm->unk3C + I(arm->qUnk44), 1, 8, SA2_LABEL(sub_801EC3C));
|
||||
if (res < 0) {
|
||||
arm->qUnk48 = arm->qUnk48 + Q(res);
|
||||
arm->qUnk4E = (arm->qUnk4E >> 2) - arm->qUnk4E;
|
||||
@@ -1256,7 +1256,8 @@ void Task_8027714(void)
|
||||
hammer->qUnk48 += hammer->qUnk4E;
|
||||
|
||||
if (hammer->qUnk4E > 0) {
|
||||
s32 res = sa2__sub_801F100(hammer->unk3E + I(hammer->qUnk48), hammer->unk3C + I(hammer->qUnk44), 1, 8, sa2__sub_801EC3C);
|
||||
s32 res
|
||||
= SA2_LABEL(sub_801F100)(hammer->unk3E + I(hammer->qUnk48), hammer->unk3C + I(hammer->qUnk44), 1, 8, SA2_LABEL(sub_801EC3C));
|
||||
if (res < 0) {
|
||||
hammer->qUnk48 = hammer->qUnk48 + Q(res);
|
||||
hammer->qUnk4E = (hammer->qUnk4E >> 2) - hammer->qUnk4E;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "constants/sa1/char_states.h"
|
||||
#include "constants/sa1/songs.h"
|
||||
|
||||
typedef struct EggPress {
|
||||
typedef struct {
|
||||
/* 0x00 */ SpriteBase base;
|
||||
/* 0x0C */ Sprite s;
|
||||
/* 0x3C */ Hitbox reserved[2];
|
||||
@@ -723,7 +723,7 @@ void Task_802EA8C(void)
|
||||
worldX = TO_WORLD_POS(boss->base.meX, boss->base.regionX) + I(boss->qUnk94);
|
||||
worldY = TO_WORLD_POS(me->y, boss->base.regionY) + I(boss->qUnk98);
|
||||
|
||||
res = sa2__sub_801F100(worldY + 0x10, worldX, 1, 8, &sa2__sub_801EC3C);
|
||||
res = SA2_LABEL(sub_801F100)(worldY + 0x10, worldX, 1, 8, &SA2_LABEL(sub_801EC3C));
|
||||
if (res < 0) {
|
||||
boss->qUnk98 += Q(res);
|
||||
boss->qUnkB2 = (boss->qUnkB2 >> 2) - boss->qUnkB2;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "constants/sa1/char_states.h"
|
||||
#include "constants/sa1/songs.h"
|
||||
|
||||
typedef struct EggBall {
|
||||
typedef struct {
|
||||
/* 0x00 */ SpriteBase base;
|
||||
/* 0x0C */ Sprite s;
|
||||
/* 0x3C */ Sprite s2;
|
||||
@@ -40,7 +40,7 @@ typedef struct EggBall {
|
||||
/* 0x98 */ void *vram98;
|
||||
} EggBall;
|
||||
|
||||
typedef struct EggBall_44 {
|
||||
typedef struct {
|
||||
/* 0x00 */ Sprite s;
|
||||
/* 0x30 */ s32 qUnk30;
|
||||
/* 0x34 */ s32 qUnk34;
|
||||
@@ -50,7 +50,7 @@ typedef struct EggBall_44 {
|
||||
/* 0x42 */ u8 unk42;
|
||||
} EggBall_44;
|
||||
|
||||
typedef struct EggBall_Pipe {
|
||||
typedef struct {
|
||||
/* 0x00 */ SpriteBase base;
|
||||
/* 0x0C */ Sprite s;
|
||||
s16 unk3C;
|
||||
@@ -621,7 +621,7 @@ void Task_802FC14(void)
|
||||
worldX = TO_WORLD_POS(boss->base.meX, boss->base.regionX) + I(boss->qUnk70);
|
||||
worldY = TO_WORLD_POS(me->y, boss->base.regionY) + I(boss->qUnk74);
|
||||
|
||||
res = sa2__sub_801F100(worldY + 0x18, worldX, 1, 8, &sa2__sub_801EC3C);
|
||||
res = SA2_LABEL(sub_801F100)(worldY + 0x18, worldX, 1, 8, &SA2_LABEL(sub_801EC3C));
|
||||
if (res < 0) {
|
||||
boss->qUnk74 += Q(res);
|
||||
boss->qUnk90 = (boss->qUnk90 >> 2) - boss->qUnk90;
|
||||
@@ -862,7 +862,7 @@ void Task_8030414(void)
|
||||
s->y = worldY - gCamera.y;
|
||||
|
||||
if (boss_44->qUnk3C > 0) {
|
||||
s32 res = sa2__sub_801F100(worldY + 0x18, worldX, 1, 8, &sa2__sub_801EC3C);
|
||||
s32 res = SA2_LABEL(sub_801F100)(worldY + 0x18, worldX, 1, 8, &SA2_LABEL(sub_801EC3C));
|
||||
|
||||
if (res < 0) {
|
||||
boss_44->qUnk34 += Q(res);
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include "constants/sa1/songs.h"
|
||||
#include "game/shared/stage/underwater_effects.h"
|
||||
|
||||
typedef struct EggSpider {
|
||||
typedef struct {
|
||||
/* 0x00 */ SpriteBase base;
|
||||
/* 0x0C */ Sprite s;
|
||||
/* 0x3C */ Sprite s2;
|
||||
@@ -38,7 +38,7 @@ typedef struct EggSpider {
|
||||
/* 0x8A */ u8 unk8C;
|
||||
} EggSpider; /* 0x90 */
|
||||
|
||||
typedef struct IciclePlatform {
|
||||
typedef struct {
|
||||
/* 0x0C */ Sprite s;
|
||||
/* 0x30 */ u8 filler30[0x14];
|
||||
/* 0x44 */ CamCoord worldX;
|
||||
@@ -568,7 +568,7 @@ void Task_8031480(void)
|
||||
worldX = TO_WORLD_POS(boss->base.meX, boss->base.regionX) + I(boss->qUnk6C);
|
||||
worldY = TO_WORLD_POS(me->y, boss->base.regionY) + I(boss->qUnk70);
|
||||
|
||||
res = sa2__sub_801F100(worldY + 0x38, worldX, 1, 8, &sa2__sub_801EC3C);
|
||||
res = SA2_LABEL(sub_801F100)(worldY + 0x38, worldX, 1, 8, &SA2_LABEL(sub_801EC3C));
|
||||
|
||||
if (boss->unk84 > 120)
|
||||
if (res < 0) {
|
||||
|
||||
@@ -61,7 +61,7 @@ typedef enum {
|
||||
/* 25 */ MKSTATE_COUNT
|
||||
} MechaKnucklesStates;
|
||||
|
||||
typedef struct MechaKnuckles {
|
||||
typedef struct {
|
||||
/* 0x00 */ SpriteBase base;
|
||||
/* 0x0C */ Sprite s;
|
||||
/* 0x3C */ Hitbox reserved;
|
||||
@@ -86,7 +86,7 @@ typedef struct MechaKnuckles {
|
||||
/* 0x9B */ s8 state2;
|
||||
} MechaKnuckles; /* 0x9C */
|
||||
|
||||
typedef struct MechaKnucklesRocket {
|
||||
typedef struct {
|
||||
/* 0x00 */ s32 unk0;
|
||||
/* 0x00 */ s32 unk4;
|
||||
/* 0x00 */ s16 unk8;
|
||||
@@ -99,7 +99,7 @@ typedef struct MechaKnucklesRocket {
|
||||
/* 0x44 */ SpriteTransform transform;
|
||||
} MechaKnucklesRocket; /* 0x50 */
|
||||
|
||||
typedef struct MechaKnucklesParts {
|
||||
typedef struct {
|
||||
/* 0x00 */ s32 unk0;
|
||||
/* 0x04 */ s32 unk4;
|
||||
/* 0x08 */ s16 unk8;
|
||||
@@ -116,7 +116,7 @@ typedef struct MechaKnucklesParts {
|
||||
typedef bool32 (*MechaKnuxPlayerFn)(MechaKnuckles *boss, Player *p);
|
||||
typedef void (*MechaKnuxFn)(MechaKnuckles *boss, Player *p);
|
||||
|
||||
typedef struct Unk {
|
||||
typedef struct {
|
||||
s16 anim;
|
||||
u8 variant;
|
||||
u8 unk3;
|
||||
@@ -195,7 +195,7 @@ bool32 sub_804FCEC(MechaKnuckles *boss, Player *p);
|
||||
bool32 sub_804FD54(MechaKnuckles *boss, Player *p);
|
||||
MechaKnucklesStates sub_804ED80(MechaKnuckles *boss, Player *p);
|
||||
|
||||
typedef struct ProcDataBoss5 {
|
||||
typedef struct {
|
||||
MechaKnuxPlayerFn knuxPlayerFn;
|
||||
MechaKnuxFn changeState;
|
||||
s16 unk8;
|
||||
@@ -810,7 +810,7 @@ void sub_804EB90(MechaKnuckles *boss)
|
||||
|
||||
boss->flags88 &= ~1;
|
||||
|
||||
res = sa2__sub_801E4E4(temp_r6 + boss->unk99, temp_r7, 1, 8, NULL, sa2__sub_801EE64);
|
||||
res = SA2_LABEL(sub_801E4E4)(temp_r6 + boss->unk99, temp_r7, 1, 8, NULL, SA2_LABEL(sub_801EE64));
|
||||
if (boss->flags88 & 0x10) {
|
||||
if (res < 0) {
|
||||
boss->qUnk78 += res << 8;
|
||||
@@ -824,7 +824,7 @@ void sub_804EB90(MechaKnuckles *boss)
|
||||
boss->flags88 &= ~2;
|
||||
|
||||
if (boss->unk7E < 0) {
|
||||
res = sa2__sub_801E4E4(temp_r6 - boss->unk99, temp_r7, 1, -8, NULL, sa2__sub_801EE64);
|
||||
res = SA2_LABEL(sub_801E4E4)(temp_r6 - boss->unk99, temp_r7, 1, -8, NULL, SA2_LABEL(sub_801EE64));
|
||||
|
||||
if (res < 0) {
|
||||
boss->qUnk78 -= Q(res);
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
#define NUM_SEGMENTS 9
|
||||
|
||||
typedef struct EggSnakeSegment {
|
||||
typedef struct {
|
||||
/* 0x00 */ Sprite s;
|
||||
/* 0x30 */ u16 unk30;
|
||||
/* 0x32 */ u16 unk32;
|
||||
@@ -31,7 +31,7 @@ typedef struct EggSnakeSegment {
|
||||
/* 0x52 */ u8 unk52;
|
||||
} EggSnakeSegment;
|
||||
|
||||
typedef struct EggSnakeSegmentManager {
|
||||
typedef struct {
|
||||
/* 0x00 */ Sprite s;
|
||||
/* 0x30 */ struct Task *tasks[NUM_SEGMENTS];
|
||||
/* 0x54 */ u8 unk54;
|
||||
@@ -45,7 +45,7 @@ typedef struct EggSnakeSegmentManager {
|
||||
s16 unk5E;
|
||||
} EggSnakeSegmentManager; /* 0x60 */
|
||||
|
||||
typedef struct EggSnakeProjectile {
|
||||
typedef struct {
|
||||
/* 0x00 */ Sprite s;
|
||||
/* 0x30 */ Sprite s2;
|
||||
/* 0x60 */ u16 unk60;
|
||||
@@ -58,7 +58,7 @@ typedef struct EggSnakeProjectile {
|
||||
/* 0x72 */ CamCoord originY;
|
||||
} EggSnakeProjectile; /* 0x74 */
|
||||
|
||||
typedef struct EggSnake {
|
||||
typedef struct {
|
||||
/* 0x00 */ SpriteBase base;
|
||||
/* 0x0C */ Sprite s;
|
||||
/* 0x3C */ Hitbox reserved;
|
||||
@@ -88,7 +88,7 @@ typedef struct EggSnake {
|
||||
} EggSnake; /* 0xAC */
|
||||
|
||||
// static memory at 0x03005860
|
||||
typedef struct PlayerSpeedState {
|
||||
typedef struct {
|
||||
/* 0x00 */ s32 qWorldX;
|
||||
/* 0x04 */ s32 qWorldY;
|
||||
/* 0x08 */ s16 qSpeedAirX;
|
||||
@@ -681,7 +681,7 @@ void Task_8032AF8(void)
|
||||
worldX = TO_WORLD_POS(boss->base.meX, boss->base.regionX) + I(boss->qUnk78);
|
||||
worldY = TO_WORLD_POS(me->y, boss->base.regionY) + I(boss->qUnk7C);
|
||||
|
||||
res = sa2__sub_801F100(worldY, worldX, 1, 8, &sa2__sub_801EC3C);
|
||||
res = SA2_LABEL(sub_801F100)(worldY, worldX, 1, 8, &SA2_LABEL(sub_801EC3C));
|
||||
|
||||
if (res < 0) {
|
||||
boss->unk98 = 60;
|
||||
@@ -1106,7 +1106,7 @@ void CreateProjectile()
|
||||
newProj->unk68 = Q(boss->unk92);
|
||||
temp_r3 = I(gPlayer.qWorldX) - (newProj->originX + I(newProj->unk64));
|
||||
temp_r1 = I(gPlayer.qWorldY) - (newProj->originY + I(newProj->unk68));
|
||||
angle = sa2__sub_8004418(temp_r1 / 2, temp_r3 / 2);
|
||||
angle = SA2_LABEL(sub_8004418)(temp_r1 / 2, temp_r3 / 2);
|
||||
newProj->unk6C = COS_24_8(angle);
|
||||
newProj->unk6E = SIN_24_8(angle);
|
||||
newProj->s.x = 0;
|
||||
|
||||
@@ -39,7 +39,7 @@ typedef struct {
|
||||
/* 0x8D */ u8 unk8E;
|
||||
} EggWrecker; /* 0x90 */
|
||||
|
||||
typedef struct EggWrecker_44 {
|
||||
typedef struct {
|
||||
/* 0x00 */ Sprite s;
|
||||
/* 0x30 */ u16 unk30;
|
||||
/* 0x30 */ s16 unk32;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
#define NUM_WHEELS 4
|
||||
|
||||
typedef struct EggDrillster {
|
||||
typedef struct {
|
||||
/* 0x00 */ SpriteBase base;
|
||||
/* 0x0C */ Sprite s;
|
||||
/* 0x3C */ Sprite s2;
|
||||
@@ -39,7 +39,7 @@ typedef struct EggDrillster {
|
||||
/* 0x8D */ char filler8E[2];
|
||||
} EggDrillster; /* size = 0x90 */
|
||||
|
||||
typedef struct Component {
|
||||
typedef struct {
|
||||
/* 0x00 */ Sprite s;
|
||||
/* 0x30 */ u16 unk30;
|
||||
/* 0x32 */ s16 unk32;
|
||||
@@ -498,7 +498,7 @@ void Task_803623C()
|
||||
switch (boss->unk8D) {
|
||||
case 0:
|
||||
boss->unk84--;
|
||||
res = sa2__sub_801F100(worldY + 20, worldX, 1, 8, sa2__sub_801EC3C);
|
||||
res = SA2_LABEL(sub_801F100)(worldY + 20, worldX, 1, 8, SA2_LABEL(sub_801EC3C));
|
||||
if (res < 0) {
|
||||
boss->unk70 += Q(res);
|
||||
boss->unk78 = 0;
|
||||
@@ -684,7 +684,7 @@ void Task_8036810()
|
||||
component->unk38 += component->qUnk3E;
|
||||
worldX = component->worldX + I(component->unk34);
|
||||
worldY = component->worldY + I(component->unk38);
|
||||
res = sa2__sub_801F100(worldY + 30, worldX, 1, 8, sa2__sub_801EC3C);
|
||||
res = SA2_LABEL(sub_801F100)(worldY + 30, worldX, 1, 8, SA2_LABEL(sub_801EC3C));
|
||||
|
||||
if (res < 0) {
|
||||
component->unk38 += Q(res);
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
/* X-Zone Final Boss */
|
||||
|
||||
typedef struct EggX_10 {
|
||||
typedef struct {
|
||||
u16 unk0;
|
||||
u16 unk2;
|
||||
u16 unk4;
|
||||
@@ -36,7 +36,7 @@ typedef struct EggX_10 {
|
||||
u16 unkE;
|
||||
} EggX_10;
|
||||
|
||||
typedef struct EggX_48 {
|
||||
typedef struct {
|
||||
Sprite s;
|
||||
u16 unk30;
|
||||
u8 filler32[0x2];
|
||||
@@ -50,7 +50,7 @@ typedef struct EggX_48 {
|
||||
u8 filler46[0x2];
|
||||
} EggX_48;
|
||||
|
||||
typedef struct EggX_Sparkle {
|
||||
typedef struct {
|
||||
/* 0x00 */ Sprite s;
|
||||
/* 0x30 */ SpriteTransform transform;
|
||||
/* 0x3C */ u16 unk3C;
|
||||
@@ -72,7 +72,7 @@ typedef struct EggX_Sparkle {
|
||||
/* 0x62 */ u8 unk62;
|
||||
} EggX_Sparkle;
|
||||
|
||||
typedef struct EggX_7C {
|
||||
typedef struct {
|
||||
Sprite s;
|
||||
Sprite s2;
|
||||
s16 unk60;
|
||||
@@ -89,7 +89,7 @@ typedef struct EggX_7C {
|
||||
u8 unk7B;
|
||||
} EggX_7C;
|
||||
|
||||
typedef struct EggX {
|
||||
typedef struct {
|
||||
/* 0x00 */ SpriteBase base;
|
||||
/* 0x0C */ Sprite s;
|
||||
/* 0x3C */ Hitbox reserved;
|
||||
@@ -1083,7 +1083,7 @@ void Task_8038154()
|
||||
switch (boss->unk99) {
|
||||
case 0:
|
||||
boss->unk92--;
|
||||
res = sa2__sub_801F100(worldY + 20, worldX, 1, 8, sa2__sub_801EC3C);
|
||||
res = SA2_LABEL(sub_801F100)(worldY + 20, worldX, 1, 8, SA2_LABEL(sub_801EC3C));
|
||||
if (res < 0) {
|
||||
boss->qUnk78 += Q(res);
|
||||
boss->qUnk80 = (boss->qUnk80 >> 2) - boss->qUnk80;
|
||||
@@ -1971,7 +1971,7 @@ void Task_80397A8(void)
|
||||
strc48->qUnk38 += strc48->qUnk3E;
|
||||
worldX = I(strc48->qUnk34) + strc48->unk40;
|
||||
worldY = I(strc48->qUnk38) + strc48->unk42;
|
||||
res = sa2__sub_801F100(worldY + 8, worldX, 1, 8, sa2__sub_801EC3C);
|
||||
res = SA2_LABEL(sub_801F100)(worldY + 8, worldX, 1, 8, SA2_LABEL(sub_801EC3C));
|
||||
if (res < 0) {
|
||||
s32 v16;
|
||||
s32 v;
|
||||
@@ -2152,7 +2152,7 @@ NONMATCH("asm/non_matching/game/sa1/stage/enemies/boss_x3__Task_8039A64.inc", vo
|
||||
|
||||
worldX = ABS(worldX);
|
||||
|
||||
worldX = (u16)sa2__sub_8004418(worldY, worldX);
|
||||
worldX = (u16)SA2_LABEL(sub_8004418)(worldY, worldX);
|
||||
if ((u32)((u32)((worldX - 225) + 0xFF1F0000) >> 0x10) < 0x11F) {
|
||||
worldX = 224;
|
||||
}
|
||||
@@ -2487,7 +2487,7 @@ void Task_803A46C()
|
||||
worldX = I(sparkle->unk54);
|
||||
worldY = I(sparkle->unk58);
|
||||
|
||||
res = SA2_LABEL(sub_801F100)(worldY + 8, worldX, 1, 8, sa2__sub_801EC3C);
|
||||
res = SA2_LABEL(sub_801F100)(worldY + 8, worldX, 1, 8, SA2_LABEL(sub_801EC3C));
|
||||
|
||||
if (res < 0) {
|
||||
sparkle->unk58 += Q(res);
|
||||
@@ -2587,7 +2587,7 @@ void sub_803A650(CamCoord worldX, CamCoord worldY)
|
||||
}
|
||||
|
||||
// Belongs to sub_803A6EC, might be able to be removed once matched...
|
||||
typedef struct Test {
|
||||
typedef struct {
|
||||
Sprite *s;
|
||||
} Test;
|
||||
|
||||
|
||||
@@ -261,11 +261,11 @@ NONMATCH("asm/non_matching/game/sa1/stage/enemies/boss_xtra__sub_8050194.inc", s
|
||||
var_r3 = I(temp_r8->unk0.qUnk54);
|
||||
sinV = (SIN_24_8(temp_r1_2) << 0xC);
|
||||
temp_r6 = var_r3 + ((((COS_24_8(temp_r1_2) * Q(9)) - (sinV)) >> 0x10) + 6);
|
||||
temp_sb = sa2__sub_801F100(temp_r6, var_r7 + 0x10, 1, 8, sa2__sub_801EC3C);
|
||||
temp_sb = SA2_LABEL(sub_801F100)(temp_r6, var_r7 + 0x10, 1, 8, SA2_LABEL(sub_801EC3C));
|
||||
temp_r4 = I(temp_r8->unk0.qUnk54);
|
||||
temp_r2 = sp8 >> 6;
|
||||
temp_r4 = (temp_r4 + (((((SIN_24_8(temp_r2)) * Q(21)) + (COS_24_8(temp_r2) << 0xB)) >> 0x10))) + 6;
|
||||
var_sl = sa2__sub_801F100(temp_r4, var_r7 + 21, 1, 8, sa2__sub_801EC3C);
|
||||
var_sl = SA2_LABEL(sub_801F100)(temp_r4, var_r7 + 21, 1, 8, SA2_LABEL(sub_801EC3C));
|
||||
if (var_sl > temp_sb) {
|
||||
var_sl = temp_sb;
|
||||
}
|
||||
@@ -293,10 +293,10 @@ NONMATCH("asm/non_matching/game/sa1/stage/enemies/boss_xtra__sub_8050194.inc", s
|
||||
var_r3 = I(temp_r8_2->unk0.qUnk54);
|
||||
sinV = ((SIN_24_8(temp_r5_2 >> 6)) << 0xC);
|
||||
temp_r5_3 = var_r3 + (((((COS_24_8(temp_r5_2 >> 6)) * Q(9)) - sinV) >> 0x10) + 6);
|
||||
temp_sb_2 = sa2__sub_801F100(temp_r5_3, var_r7_2 + 16, 1, 8, sa2__sub_801EC3C);
|
||||
temp_sb_2 = SA2_LABEL(sub_801F100)(temp_r5_3, var_r7_2 + 16, 1, 8, SA2_LABEL(sub_801EC3C));
|
||||
temp_r4_2 = I(temp_r8_2->unk0.qUnk54);
|
||||
temp_r4_2 += ((((SIN_24_8(spC >> 6)) * Q(21)) + ((COS_24_8(spC >> 6)) << 0xB)) >> 0x10) + 6;
|
||||
var_r6 = sa2__sub_801F100(temp_r4_2, var_r7_2 + 21, 1, 8, sa2__sub_801EC3C);
|
||||
var_r6 = SA2_LABEL(sub_801F100)(temp_r4_2, var_r7_2 + 21, 1, 8, SA2_LABEL(sub_801EC3C));
|
||||
if (var_r6 > temp_sb_2) {
|
||||
var_r6 = temp_sb_2;
|
||||
}
|
||||
@@ -322,7 +322,7 @@ NONMATCH("asm/non_matching/game/sa1/stage/enemies/boss_xtra__sub_8050194.inc", s
|
||||
var_r4 = Mod(var_r4 - 72, 0xA80) + 72;
|
||||
}
|
||||
|
||||
var_r0 = sa2__sub_801F100(temp_r7, var_r4, 1, 8, sa2__sub_801EC3C);
|
||||
var_r0 = SA2_LABEL(sub_801F100)(temp_r7, var_r4, 1, 8, SA2_LABEL(sub_801EC3C));
|
||||
var_r1 = var_r6;
|
||||
if (var_r1 > var_sl) {
|
||||
var_r1 = var_sl;
|
||||
@@ -537,7 +537,7 @@ void sub_8050888()
|
||||
s->frameFlags = (s->frameFlags & 0xFFFE7FFF) | 0x10000;
|
||||
UpdateSpriteAnimation_BG(s);
|
||||
DisplaySprite_BG(s);
|
||||
sa2__sub_8003EE4((strc->unk70 >> 6), 0x100, 0x100, 0x7C, 0x80, screenX, screenY, gBgAffineRegs);
|
||||
SA2_LABEL(sub_8003EE4)((strc->unk70 >> 6), 0x100, 0x100, 0x7C, 0x80, screenX, screenY, gBgAffineRegs);
|
||||
|
||||
switch (boss->unk6E) {
|
||||
case 4:
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
/* TODO: Maybe inline this file into bosses_misc.c ? */
|
||||
|
||||
typedef struct PostBossEggMobile {
|
||||
typedef struct {
|
||||
/* 0x00 */ Sprite s;
|
||||
/* 0x30 */ Sprite s2;
|
||||
/* 0x60 */ CamCoord worldX;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include "constants/sa1/vram_hardcoded.h"
|
||||
#include "constants/sa1/zones.h"
|
||||
|
||||
typedef struct BossCapsule {
|
||||
typedef struct {
|
||||
/* 0x00 */ Sprite s;
|
||||
/* 0x30 */ Sprite s2;
|
||||
/* 0x60 */ SpriteTransform transform;
|
||||
@@ -31,7 +31,7 @@ typedef struct BossCapsule {
|
||||
/* 0x74 */ u16 unk76;
|
||||
} BossCapsule;
|
||||
|
||||
typedef struct Strc_sub_801749C {
|
||||
typedef struct {
|
||||
/* 0x00 */ s16 unk0;
|
||||
/* 0x02 */ s16 unk2;
|
||||
/* 0x04 */ s16 unk4;
|
||||
@@ -40,7 +40,7 @@ typedef struct Strc_sub_801749C {
|
||||
/* 0x0A */ u16 unkA;
|
||||
} Strc_sub_801749C;
|
||||
|
||||
typedef struct Strc_sub_8016D80 {
|
||||
typedef struct {
|
||||
/* 0x00 */ Sprite s;
|
||||
/* 0x30 */ s32 qUnk30;
|
||||
/* 0x30 */ s32 qUnk34;
|
||||
@@ -51,7 +51,7 @@ typedef struct Strc_sub_8016D80 {
|
||||
/* 0x38 */ s16 qUnk40;
|
||||
} Strc_sub_8016D80;
|
||||
|
||||
typedef struct Strc_sub_8016F44 {
|
||||
typedef struct {
|
||||
/* 0x00 */ Sprite s;
|
||||
/* 0x30 */ SpriteTransform transform;
|
||||
/* 0x3C */ s32 unk3C;
|
||||
@@ -66,14 +66,14 @@ typedef struct Strc_sub_8016F44 {
|
||||
/* 0x40 */ s16 unk52;
|
||||
} Strc_sub_8016F44; /* 0x54 */
|
||||
|
||||
typedef struct CameraPanning {
|
||||
typedef struct {
|
||||
/* 0x00 */ CamCoord unk0;
|
||||
/* 0x02 */ CamCoord unk2;
|
||||
/* 0x04 */ CamCoord unk4;
|
||||
/* 0x06 */ CamCoord unk6;
|
||||
} CameraPanning;
|
||||
|
||||
typedef struct Strc_sub_801766C {
|
||||
typedef struct {
|
||||
/* 0x00 */ s16 unk0;
|
||||
/* 0x02 */ s16 unk2;
|
||||
/* 0x04 */ Player *p;
|
||||
@@ -215,7 +215,7 @@ void Task_801623C()
|
||||
return;
|
||||
}
|
||||
|
||||
res = sa2__sub_801F100(gCamera.y + s->y + 8, gCamera.x + s->x, 1, 8, sa2__sub_801EC3C);
|
||||
res = SA2_LABEL(sub_801F100)(gCamera.y + s->y + 8, gCamera.x + s->x, 1, 8, SA2_LABEL(sub_801EC3C));
|
||||
if (res > 0) {
|
||||
return;
|
||||
}
|
||||
@@ -641,7 +641,7 @@ void sub_8016E54()
|
||||
strc->qUnk30 += strc->qUnk3E;
|
||||
|
||||
if ((strc->qUnk3C > 0)
|
||||
&& (sa2__sub_801F100(strc->unk3A + I(strc->qUnk34), strc->unk38 + I(strc->qUnk30), 1, 8, sa2__sub_801EC3C) < 0)) {
|
||||
&& (SA2_LABEL(sub_801F100)(strc->unk3A + I(strc->qUnk34), strc->unk38 + I(strc->qUnk30), 1, 8, SA2_LABEL(sub_801EC3C)) < 0)) {
|
||||
strc->qUnk3C = strc->qUnk40;
|
||||
|
||||
if ((I(strc->qUnk30) < -32) && (strc->qUnk3E < 0)) {
|
||||
@@ -909,7 +909,7 @@ void Task_8017400(void)
|
||||
}
|
||||
}
|
||||
|
||||
struct Task *sub_801749C(s16 worldX, s16 worldY)
|
||||
struct Task *sub_801749C(CamCoord worldX, CamCoord worldY)
|
||||
{
|
||||
struct Task *t;
|
||||
Strc_sub_801749C *strc;
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
/* Used by Chao Hunt and Collect Rings as HUD task */
|
||||
|
||||
typedef struct ChaoHuntHUD {
|
||||
typedef struct {
|
||||
Sprite s0;
|
||||
Sprite spritesA[11];
|
||||
Sprite spritesB[11];
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "constants/sa1/songs.h"
|
||||
#include "constants/sa1/text.h"
|
||||
|
||||
typedef struct MPResults {
|
||||
typedef struct {
|
||||
/* 0x00 */ Background bg;
|
||||
/* 0x40 */ Sprite s;
|
||||
/* 0x70 */ Sprite s2;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "constants/sa1/songs.h"
|
||||
#include "constants/sa1/text.h"
|
||||
|
||||
typedef struct MPResultsB {
|
||||
typedef struct {
|
||||
/* 0x00 */ Background bg;
|
||||
/* 0x40 */ Background bg2;
|
||||
/* 0x80 */ Sprite s;
|
||||
@@ -690,8 +690,8 @@ block_18:
|
||||
return;
|
||||
}
|
||||
block_39:
|
||||
sa2__sub_80064A8(0U, 0x74U, 0U, 0x7CU, 8U, 0xF0U);
|
||||
sa2__sub_80064A8(0U, 0x7CU, 8U, 0x74U, 0x10U, 0xF0U);
|
||||
SA2_LABEL(sub_80064A8)(0U, 0x74U, 0U, 0x7CU, 8U, 0xF0U);
|
||||
SA2_LABEL(sub_80064A8)(0U, 0x7CU, 8U, 0x74U, 0x10U, 0xF0U);
|
||||
|
||||
// TOOD
|
||||
#ifndef NON_MATCHING
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
#include "constants/sa1/tilemaps.h"
|
||||
#include "constants/sa1/ui_graphics.h"
|
||||
|
||||
typedef struct SpriteStrc {
|
||||
typedef struct {
|
||||
Sprite s;
|
||||
u8 filler30[0x8];
|
||||
} SpriteStrc;
|
||||
|
||||
typedef struct MPStrc1 {
|
||||
typedef struct {
|
||||
/* 0x00 */ Background bg0;
|
||||
/* 0x40 */ u8 filler40[0x40];
|
||||
/* 0x80 */ SpriteStrc sprites[4];
|
||||
@@ -37,7 +37,7 @@ typedef struct MPStrc1 {
|
||||
/* 0x432 */ s16 unk432;
|
||||
} MPStrc1; /* 0x434 */
|
||||
|
||||
typedef struct MPStrc2 {
|
||||
typedef struct {
|
||||
/* 0x00 */ GameOverB overBs[4];
|
||||
/* 0x60 */ u16 unk60;
|
||||
/* 0x60 */ u16 unk62;
|
||||
|
||||
@@ -187,7 +187,7 @@ void Player_Amy_80495F0(Player *p)
|
||||
{
|
||||
Player_804726C(p);
|
||||
Player_8047280(p);
|
||||
sa2__sub_80232D0(p);
|
||||
SA2_LABEL(sub_80232D0)(p);
|
||||
Player_UpdatePosition(p);
|
||||
PlayerFn_Cmd_UpdateAirFallSpeed(p);
|
||||
Player_8047224(p);
|
||||
|
||||
@@ -195,7 +195,7 @@ NONMATCH("asm/non_matching/game/sa1/stage/Player__sub_8048230.inc", void sub_804
|
||||
worldX = (I(p->qWorldX) + 1);
|
||||
worldX += p->spriteOffsetX;
|
||||
|
||||
if (SA2_LABEL(sub_801E4E4)(worldY, worldX, p->layer, +8, NULL, sa2__sub_801EE64) < 0) {
|
||||
if (SA2_LABEL(sub_801E4E4)(worldY, worldX, p->layer, +8, NULL, SA2_LABEL(sub_801EE64)) < 0) {
|
||||
goto _08048450;
|
||||
}
|
||||
}
|
||||
@@ -929,7 +929,7 @@ void sub_8048E34(Player *p)
|
||||
}
|
||||
|
||||
sub_8048980(p);
|
||||
sa2__sub_80232D0(p);
|
||||
SA2_LABEL(sub_80232D0)(p);
|
||||
Player_UpdatePosition(p);
|
||||
|
||||
switch (p->SA2_LABEL(unk61)) {
|
||||
|
||||
@@ -23,20 +23,20 @@
|
||||
#define CIDX_BLOCK 3 // appears when a character was chosen already in MP
|
||||
#define CIDX_COUNT 4
|
||||
|
||||
typedef struct CharSelect_20 {
|
||||
typedef struct {
|
||||
GameOverB overB;
|
||||
s32 unk18;
|
||||
u16 unk1C;
|
||||
s16 unk1E;
|
||||
} CharSelect_20;
|
||||
|
||||
typedef struct CharSelect_34 {
|
||||
typedef struct {
|
||||
Sprite s;
|
||||
u16 unk30;
|
||||
u16 unk32;
|
||||
} CharSelect_34;
|
||||
|
||||
typedef struct CharSelect_3C {
|
||||
typedef struct {
|
||||
StrcUi_805423C strc0;
|
||||
struct Task *taskC; // -> CharSelect_Chars
|
||||
struct Task *task10; // -> CharSelect_20
|
||||
@@ -56,7 +56,7 @@ typedef struct CharSelect_3C {
|
||||
u8 unk39;
|
||||
} CharSelect_3C;
|
||||
|
||||
typedef struct CharSelect_44 {
|
||||
typedef struct {
|
||||
GameOverB overB;
|
||||
GameOverB overB2;
|
||||
u32 unk30;
|
||||
@@ -66,7 +66,7 @@ typedef struct CharSelect_44 {
|
||||
s16 unk40;
|
||||
} CharSelect_44;
|
||||
|
||||
typedef struct CharSelect_Chars {
|
||||
typedef struct {
|
||||
Sprite sprites[CIDX_COUNT];
|
||||
u32 unkC0;
|
||||
s16 unkC4;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#include "constants/sa1/animations.h"
|
||||
|
||||
typedef struct CollectEmeraldsScreen {
|
||||
typedef struct {
|
||||
Sprite sprites[3];
|
||||
StrcUi_805423C strc90;
|
||||
u32 unk9C;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "constants/sa1/songs.h"
|
||||
#include "constants/sa1/ui_graphics.h"
|
||||
|
||||
typedef struct CourseSelectState {
|
||||
typedef struct {
|
||||
StrcUi_805423C strc0;
|
||||
u8 fillerC[4];
|
||||
struct Task *task10;
|
||||
@@ -33,7 +33,7 @@ typedef struct CourseSelectState {
|
||||
u8 unk59;
|
||||
} CourseSelectState;
|
||||
|
||||
typedef struct CourseSelect_54 {
|
||||
typedef struct {
|
||||
Sprite s;
|
||||
u8 filler30[0x18];
|
||||
u32 unk48;
|
||||
@@ -44,7 +44,7 @@ typedef struct CourseSelect_54 {
|
||||
u8 unk51;
|
||||
} CourseSelect_54;
|
||||
|
||||
typedef struct CourseSelect_2DC {
|
||||
typedef struct {
|
||||
Sprite sprites[15];
|
||||
u32 unk2D0;
|
||||
u16 unk2D4;
|
||||
@@ -64,7 +64,7 @@ extern u8 gUnknown_086A3DB4[];
|
||||
|
||||
extern u8 gUnknown_03005140;
|
||||
|
||||
typedef struct StaticTileInfo {
|
||||
typedef struct {
|
||||
void *vram;
|
||||
u32 anim;
|
||||
u32 variant;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "constants/sa1/songs.h"
|
||||
#include "constants/sa1/text.h"
|
||||
|
||||
typedef struct CongratulationsAnim_48 {
|
||||
typedef struct {
|
||||
StrcUi_805423C strc0;
|
||||
struct Task *taskC;
|
||||
struct Task *task10;
|
||||
@@ -33,7 +33,7 @@ typedef struct CongratulationsAnim_48 {
|
||||
s16 unk46;
|
||||
} CongratulationsAnim_48;
|
||||
|
||||
typedef struct ExtraStageResults_64 {
|
||||
typedef struct {
|
||||
Sprite s;
|
||||
SpriteTransform transform;
|
||||
u32 unk3C;
|
||||
@@ -45,7 +45,7 @@ typedef struct ExtraStageResults_64 {
|
||||
|
||||
// TODO:
|
||||
// This might just have been struct ExtraStageResults_164 all along?
|
||||
typedef struct ExtraStageResults_64_2 {
|
||||
typedef struct {
|
||||
Sprite s;
|
||||
SpriteTransform transform;
|
||||
u16 unk3C;
|
||||
@@ -55,7 +55,7 @@ typedef struct ExtraStageResults_64_2 {
|
||||
s32 qUnk54[4];
|
||||
} ExtraStageResults_64_2;
|
||||
|
||||
typedef struct ExtraStageResults_164 {
|
||||
typedef struct {
|
||||
Sprite s;
|
||||
SpriteTransform transform;
|
||||
u16 unk3C;
|
||||
@@ -73,7 +73,7 @@ typedef struct ExtraStageResults_164 {
|
||||
u8 filler15E[0x7];
|
||||
} ExtraStageResults_164;
|
||||
|
||||
typedef struct ExtraStageResultsState {
|
||||
typedef struct {
|
||||
StrcUi_805423C strc0; // -> ExtraStageResults_64
|
||||
struct Task *taskC; // -> ExtraStageResults_64
|
||||
struct Task *task10; // -> ExtraStageResults_64
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
#include "constants/sa1/animations.h"
|
||||
|
||||
typedef struct Game_2_0_Sub {
|
||||
typedef struct {
|
||||
union {
|
||||
// TODO: This union might actually be their shared global type?
|
||||
GameOverB overB;
|
||||
@@ -24,7 +24,7 @@ typedef struct Game_2_0_Sub {
|
||||
u16 unk1A;
|
||||
} Game_2_0_Sub;
|
||||
|
||||
typedef struct Game_2_0 {
|
||||
typedef struct {
|
||||
s16 unk0;
|
||||
s16 unk2;
|
||||
s16 unk4;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "constants/sa1/songs.h"
|
||||
#include "constants/sa1/zones.h"
|
||||
|
||||
typedef struct Game_2_1_2C {
|
||||
typedef struct {
|
||||
u8 filler0[0xC];
|
||||
struct Task *taskC;
|
||||
struct Task *task10;
|
||||
@@ -28,7 +28,7 @@ typedef struct Game_2_1_2C {
|
||||
u16 unk2A;
|
||||
} Game_2_1_2C;
|
||||
|
||||
typedef struct Game_2_1_34 {
|
||||
typedef struct {
|
||||
union {
|
||||
// TODO: This union might actually be their shared global type?
|
||||
GameOverB overB;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "constants/sa1/songs.h"
|
||||
#include "constants/sa1/zones.h"
|
||||
|
||||
typedef struct Game_2_3_54 {
|
||||
typedef struct {
|
||||
u8 filler0[0x48];
|
||||
s32 unk48;
|
||||
s16 unk4C;
|
||||
@@ -22,7 +22,7 @@ typedef struct Game_2_3_54 {
|
||||
u8 unk51;
|
||||
} Game_2_3_54;
|
||||
|
||||
typedef struct Game_2_3_5C {
|
||||
typedef struct {
|
||||
StrcUi_805423C strc0;
|
||||
struct Task *taskC; // -> Game_2_3_54
|
||||
struct Task *task10; // -> Game_2_3_2DC
|
||||
@@ -38,7 +38,7 @@ typedef struct Game_2_3_5C {
|
||||
u8 unk58;
|
||||
} Game_2_3_5C;
|
||||
|
||||
typedef struct Game_2_3_2DC {
|
||||
typedef struct {
|
||||
Sprite sprites[5];
|
||||
u8 fillerF0[0x1E0];
|
||||
s32 unk2D0;
|
||||
@@ -66,7 +66,7 @@ extern u8 gUnknown_086A4FB4[];
|
||||
extern u16 gUnknown_086A4DB4[256];
|
||||
extern u8 gUnknown_086A5834[];
|
||||
|
||||
typedef struct TileInfo32 {
|
||||
typedef struct {
|
||||
void *vram;
|
||||
u32 anim;
|
||||
u32 variant;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#define EMERALD_START_X DISPLAY_CENTER_X
|
||||
#define EMERALD_START_Y -36
|
||||
typedef struct IntroSprite {
|
||||
typedef struct {
|
||||
Sprite s;
|
||||
u16 unk30;
|
||||
u8 unk32;
|
||||
@@ -28,14 +28,14 @@ typedef struct IntroSprite {
|
||||
s32 qUnk40;
|
||||
} IntroSprite; /* 0x44 */
|
||||
|
||||
typedef struct Intro_C8 {
|
||||
typedef struct {
|
||||
Sprite sprites[3];
|
||||
u8 filler60[0x24];
|
||||
u16 unkB4;
|
||||
u8 fillerB6[0x12];
|
||||
} Intro_C8; /* 0xC8 */
|
||||
|
||||
typedef struct Intro_54 {
|
||||
typedef struct {
|
||||
StrcUi_805423C strc0;
|
||||
struct Task *taskC;
|
||||
struct Task *beamTasks[INTRO_SPOTLIGHT_COUNT]; // -> SpotlightBeam
|
||||
@@ -110,7 +110,7 @@ const s16 gUnknown_0868B280[2] = { 0x5C, 0x5A };
|
||||
const s16 gUnknown_0868B284[2] = { 0x58, 0x70 };
|
||||
const s16 gUnknown_0868B288[2] = { 0x1C, 0x5A };
|
||||
// TODO: This struct already appeared somewhere else. Merge them!
|
||||
typedef struct LocalTileInfo {
|
||||
typedef struct {
|
||||
u32 anim;
|
||||
u32 variant;
|
||||
void *vram;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#include "constants/sa1/text.h"
|
||||
|
||||
typedef struct ContinueScreen {
|
||||
typedef struct {
|
||||
Background bg;
|
||||
Sprite sprites[3];
|
||||
Sprite sprD0;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
DisplaySprite(s);
|
||||
#endif
|
||||
|
||||
typedef struct SoundTestState {
|
||||
typedef struct {
|
||||
StrcUi_805423C strc0;
|
||||
struct Task *taskC; // SoundTest114
|
||||
struct Task *task10; // SoundTest114
|
||||
@@ -41,7 +41,7 @@ typedef struct SoundTestState {
|
||||
u8 unk2C;
|
||||
} SoundTestState; /* 0x30 */
|
||||
|
||||
typedef struct SoundTest114 {
|
||||
typedef struct {
|
||||
Sprite s;
|
||||
SpriteTransform transform;
|
||||
Sprite s2;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#define FRAME_RELAY_A 90
|
||||
#define FRAME_RELAY_B 150
|
||||
|
||||
typedef struct SpecialStageIntro44 {
|
||||
typedef struct {
|
||||
Sprite s;
|
||||
u32 unk30;
|
||||
s32 qUnk34;
|
||||
@@ -25,7 +25,7 @@ typedef struct SpecialStageIntro44 {
|
||||
} SpecialStageIntro44;
|
||||
|
||||
// TODO: Integrate SpecialStageIntro44 into this?
|
||||
typedef struct SpecialStageIntroC4 {
|
||||
typedef struct {
|
||||
Sprite s;
|
||||
u32 unk30;
|
||||
s32 qUnk34;
|
||||
@@ -37,7 +37,7 @@ typedef struct SpecialStageIntroC4 {
|
||||
} SpecialStageIntroC4; /* 0xC4 */
|
||||
|
||||
// TODO: Integrate SpecialStageIntro44 into this?
|
||||
typedef struct SpecialStageIntro64 {
|
||||
typedef struct {
|
||||
Sprite s;
|
||||
u32 unk30;
|
||||
s32 qUnk34;
|
||||
@@ -47,7 +47,7 @@ typedef struct SpecialStageIntro64 {
|
||||
s32 unk44[8];
|
||||
} SpecialStageIntro64; /* 0xC4 */
|
||||
|
||||
typedef struct SpecialStageIntro20 {
|
||||
typedef struct {
|
||||
StrcUi_805423C strc0;
|
||||
struct Task *taskC; // SpecialStageIntro64
|
||||
struct Task *task10; // SpecialStageIntro64
|
||||
@@ -58,7 +58,7 @@ typedef struct SpecialStageIntro20 {
|
||||
s16 unk1E;
|
||||
} SpecialStageIntro20;
|
||||
|
||||
typedef struct SpecialStageIntro28 {
|
||||
typedef struct {
|
||||
StrcUi_805423C strc0;
|
||||
struct Task *taskC; // SpecialStageIntro44
|
||||
struct Task *task10; // SpecialStageIntro44
|
||||
|
||||
@@ -25,7 +25,7 @@ const ALIGNED(4) u16 gUnknown_086886A0[12] = {
|
||||
322, 0, //
|
||||
};
|
||||
|
||||
typedef struct StaffCredits {
|
||||
typedef struct {
|
||||
/* 0x00 */ Sprite s;
|
||||
/* 0x30 */ Sprite s2;
|
||||
/* 0x60 */ u8 unk60[8];
|
||||
@@ -41,7 +41,7 @@ typedef struct StaffCredits {
|
||||
/* 0x7C */ u32 unk7C;
|
||||
} StaffCredits;
|
||||
|
||||
typedef struct Credits_18 {
|
||||
typedef struct {
|
||||
/* 0x00 */ StrcUi_805423C strc;
|
||||
/* 0x0C */ struct Task *task1; // -> (StaffCredits *)
|
||||
/* 0x10 */ struct Task *task2; // -> (StaffCredits *)
|
||||
|
||||
@@ -17,12 +17,12 @@
|
||||
#include "constants/sa1/songs.h"
|
||||
#include "constants/sa1/zones.h"
|
||||
|
||||
typedef struct VramPtrs {
|
||||
typedef struct {
|
||||
/* 0x00 */ void *vram0;
|
||||
/* 0x04 */ void *vram4;
|
||||
} VramPtrs;
|
||||
|
||||
typedef struct StrcStgResults_34 {
|
||||
typedef struct {
|
||||
/* 0x00 */ GameOverB unk0;
|
||||
/* 0x18 */ s32 unk18;
|
||||
/* 0x1C */ u16 unk1C;
|
||||
@@ -31,7 +31,7 @@ typedef struct StrcStgResults_34 {
|
||||
/* 0x30 */ s32 unk30;
|
||||
} StrcStgResults_34; /* 0x34 */
|
||||
|
||||
typedef struct StrcStgResults_38 {
|
||||
typedef struct {
|
||||
/* 0x00 */ u16 unk0;
|
||||
/* 0x02 */ u16 unk2;
|
||||
/* 0x04 */ u16 unk4;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "constants/sa1/songs.h"
|
||||
#include "constants/sa1/text.h"
|
||||
|
||||
typedef struct TimeAttackLobby {
|
||||
typedef struct {
|
||||
/* 0x000 */ Sprite sprites[4];
|
||||
/* 0x0C0 */ Sprite s2;
|
||||
/* 0x0F0 */ Sprite s3;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "constants/sa1/songs.h"
|
||||
#include "constants/sa1/ui_graphics.h"
|
||||
|
||||
typedef struct TimeAttackRecord_58 {
|
||||
typedef struct {
|
||||
/* 0x00 */ Sprite s;
|
||||
/* 0x30 */ GameOverB overB;
|
||||
/* 0x48 */ s32 unk48;
|
||||
@@ -23,7 +23,7 @@ typedef struct TimeAttackRecord_58 {
|
||||
/* 0x54 */ u8 unk54;
|
||||
} TimeAttackRecord_58;
|
||||
|
||||
typedef struct TimeAttackRecord_E4 {
|
||||
typedef struct {
|
||||
StrcUi_805423C strc0;
|
||||
Sprite s;
|
||||
Sprite s2;
|
||||
|
||||
@@ -17,14 +17,14 @@
|
||||
|
||||
/* These are the records appearing after selecting / before starting to play a stage */
|
||||
|
||||
typedef struct CharacterCard {
|
||||
typedef struct {
|
||||
const u8 *tiles;
|
||||
s32 tilesSize;
|
||||
const u16 *palette;
|
||||
const u8 *layout;
|
||||
} CharacterCard;
|
||||
|
||||
typedef struct TimeAttackRecords {
|
||||
typedef struct {
|
||||
/* 0x00 */ Sprite sprites[3];
|
||||
/* 0x90 */ Sprite s3;
|
||||
/* 0xC0 */ GameOverB overB;
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#include "constants/sa1/animations.h"
|
||||
|
||||
typedef struct Game2_5 {
|
||||
typedef struct {
|
||||
/* 0x00 */ Sprite s;
|
||||
/* 0x30 */ Sprite s2;
|
||||
/* 0x60 */ GameOverB strc60;
|
||||
|
||||
@@ -10,14 +10,14 @@
|
||||
#include "constants/sa1/animations.h"
|
||||
#include "constants/sa1/zones.h"
|
||||
|
||||
typedef struct TimeOverState {
|
||||
typedef struct {
|
||||
StrcUi_805423C strc0;
|
||||
Sprite s;
|
||||
Sprite s2;
|
||||
s32 timer;
|
||||
} TimeOverState;
|
||||
|
||||
typedef struct TimeOverTimer {
|
||||
typedef struct {
|
||||
struct Task *t; // -> TimeOverState
|
||||
s16 timer;
|
||||
} TimeOverTimer;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "game/sa1/save.h"
|
||||
#include "game/sa1/stage/stage_ui.h"
|
||||
|
||||
typedef struct VsRecord_10 {
|
||||
typedef struct {
|
||||
s32 unk0;
|
||||
u8 unk4[8];
|
||||
s8 unkC;
|
||||
@@ -15,7 +15,7 @@ typedef struct VsRecord_10 {
|
||||
u8 unkF;
|
||||
} VsRecord_10;
|
||||
|
||||
typedef struct VsRecord_48 {
|
||||
typedef struct {
|
||||
/* 0x00 */ StrcUi_805423C strc;
|
||||
/* 0x0C */ Sprite s;
|
||||
/* 0x3C */ struct Task *task3C;
|
||||
@@ -23,7 +23,7 @@ typedef struct VsRecord_48 {
|
||||
/* 0x44 */ s32 unk44;
|
||||
} VsRecord_48;
|
||||
|
||||
typedef struct VsRecord_F0 {
|
||||
typedef struct {
|
||||
/* 0x00 */ VsRecord_10 records[10];
|
||||
/* 0xA0 */ GameOverB unkA0;
|
||||
/* 0xB8 */ Sprite s;
|
||||
|
||||
@@ -1250,7 +1250,7 @@ void CreateNewProfileScreen(void)
|
||||
struct Task *t;
|
||||
struct LanguageScreen *languageScreen;
|
||||
|
||||
ShuffleRngSeed();
|
||||
SHUFFLE_RNG_SEED();
|
||||
|
||||
t = TaskCreate(Task_LanguageScreenFadeIn, sizeof(struct LanguageScreen), 0x2000, TASK_x0004, NULL);
|
||||
languageScreen = TASK_DATA(t);
|
||||
@@ -3420,7 +3420,7 @@ static void Task_ProfileNameScreenMain(void)
|
||||
|
||||
ProfileNameScreenRenderUI();
|
||||
|
||||
ShuffleRngSeed();
|
||||
SHUFFLE_RNG_SEED();
|
||||
|
||||
// Don't bother continuing if we take input
|
||||
// from any other functions
|
||||
@@ -5812,7 +5812,7 @@ static void Task_LanguageScreenFadeOutAndExit(void)
|
||||
TaskDestroy(gCurTask);
|
||||
}
|
||||
|
||||
static void ReseedRng(void) { ShuffleRngSeed(); }
|
||||
static void ReseedRng(void) { SHUFFLE_RNG_SEED(); }
|
||||
|
||||
static void LanguageScreenRenderUI(void)
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
void StageBgUpdate_Zone1ActBoss(UNUSED s32 x, UNUSED s32 y)
|
||||
{
|
||||
struct Camera *cam = &gCamera;
|
||||
Camera *cam = &gCamera;
|
||||
if (!PLAYER_IS_ALIVE) {
|
||||
gStageTime--;
|
||||
}
|
||||
|
||||
@@ -196,7 +196,7 @@ static void Task_AmyAttackHeartEffect(void)
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(hearts->sprHearts); i++) {
|
||||
struct Camera *cam = &gCamera;
|
||||
Camera *cam = &gCamera;
|
||||
|
||||
if (hearts->animFrames[i].count != 0) {
|
||||
Sprite *s;
|
||||
|
||||
@@ -66,13 +66,13 @@
|
||||
#endif
|
||||
|
||||
// Probably a array (as it's aligned 16)
|
||||
struct Backgrounds ALIGNED(16) gStageBackgroundsRam = {};
|
||||
StageBackgrounds ALIGNED(16) gStageBackgroundsRam = {};
|
||||
|
||||
#ifndef COLLECT_RINGS_ROM
|
||||
UNUSED u32 unused_3005950[3] = {};
|
||||
#endif
|
||||
|
||||
struct Camera ALIGNED(8) gCamera = {};
|
||||
Camera ALIGNED(8) gCamera = {};
|
||||
|
||||
static void RenderMetatileLayers(s32, s32);
|
||||
void Task_CallUpdateCamera(void);
|
||||
@@ -489,10 +489,10 @@ void InitCamera(u32 level)
|
||||
{
|
||||
u32 txtSize;
|
||||
|
||||
struct Backgrounds *bgs;
|
||||
StageBackgrounds *bgs;
|
||||
const Background *bgTemplates;
|
||||
Player *player = &gPlayer;
|
||||
struct Camera *camera = &gCamera;
|
||||
Camera *camera = &gCamera;
|
||||
const s8 *bgDim = sStageBgDimensions[level];
|
||||
|
||||
gDispCnt = (DISPCNT_OBJ_ON | DISPCNT_WIN0_ON | DISPCNT_BG1_ON | DISPCNT_BG2_ON | DISPCNT_BG3_ON | DISPCNT_OBJ_1D_MAP);
|
||||
@@ -697,7 +697,7 @@ void InitCamera(u32 level)
|
||||
void UpdateCamera(void)
|
||||
{
|
||||
Player *player = &gPlayer;
|
||||
struct Camera *camera = &gCamera;
|
||||
Camera *camera = &gCamera;
|
||||
s32 newX, newY;
|
||||
|
||||
#if DEBUG
|
||||
@@ -1131,7 +1131,7 @@ void HBlankCallback_803F92C(int_vcount line)
|
||||
|
||||
UNUSED void SA2_LABEL(sub_801E3F0)(void)
|
||||
{
|
||||
struct Camera *cam = &gCamera;
|
||||
Camera *cam = &gCamera;
|
||||
|
||||
if (gStageTime & 0x1) {
|
||||
cam->shiftY = ((u32)(PseudoRandom32() & 0x70000) >> 16) - 8;
|
||||
|
||||
@@ -373,7 +373,7 @@ block_23:
|
||||
if (sp40 == 0) {
|
||||
temp_r3_9 = sp3C + ((((worldY + (&sp10[0])[1]) - (&sp8[0])[3]) << 8) - (gPlayer.qWorldY & 0xFFFFFF00));
|
||||
sp3C = temp_r3_9;
|
||||
res = sa2__sub_801F100((temp_r3_9 >> 8) - gPlayer.spriteOffsetY, temp_r0_7, layer, -8, sa2__sub_801EC3C);
|
||||
res = SA2_LABEL(sub_801F100)((temp_r3_9 >> 8) - gPlayer.spriteOffsetY, temp_r0_7, layer, -8, SA2_LABEL(sub_801EC3C));
|
||||
if (res < 0) {
|
||||
temp_r1_17 = gPlayer.moveState & ~4;
|
||||
gPlayer.moveState = temp_r1_17;
|
||||
@@ -402,7 +402,7 @@ block_23:
|
||||
gPlayer.qWorldY = sp3C;
|
||||
} else {
|
||||
sp3C += (Q(worldY + sp10[3] - sp8[3]) - (gPlayer.qWorldY & 0xFFFFFF00));
|
||||
res = sa2__sub_801F100((sp3C >> 8) + gPlayer.spriteOffsetY, temp_r0_7, layer, 8, sa2__sub_801EC3C);
|
||||
res = SA2_LABEL(sub_801F100)((sp3C >> 8) + gPlayer.spriteOffsetY, temp_r0_7, layer, 8, SA2_LABEL(sub_801EC3C));
|
||||
if (res < 0) {
|
||||
temp_r1_15 = gPlayer.moveState & ~4;
|
||||
gPlayer.moveState = temp_r1_15;
|
||||
@@ -450,7 +450,7 @@ block_23:
|
||||
}
|
||||
block_80:
|
||||
if (sp40 == 0) {
|
||||
res = sa2__sub_801F100(gPlayer.spriteOffsetY + I(gPlayer.qWorldY), temp_r0_7, layer, 8, sa2__sub_801EC3C);
|
||||
res = SA2_LABEL(sub_801F100)(gPlayer.spriteOffsetY + I(gPlayer.qWorldY), temp_r0_7, layer, 8, SA2_LABEL(sub_801EC3C));
|
||||
if (res < 0) {
|
||||
gPlayer.moveState &= ~4;
|
||||
;
|
||||
@@ -467,7 +467,7 @@ block_23:
|
||||
}
|
||||
var_r1 = gPlayer.qSpeedAirY - qSpeedY;
|
||||
} else {
|
||||
res = sa2__sub_801F100(I(gPlayer.qWorldY) - gPlayer.spriteOffsetY, temp_r0_7, layer, -8, sa2__sub_801EC3C);
|
||||
res = SA2_LABEL(sub_801F100)(I(gPlayer.qWorldY) - gPlayer.spriteOffsetY, temp_r0_7, layer, -8, SA2_LABEL(sub_801EC3C));
|
||||
if (res < 0) {
|
||||
temp_r1_5 = gPlayer.moveState & ~4;
|
||||
gPlayer.moveState = temp_r1_5;
|
||||
@@ -526,7 +526,8 @@ block_23:
|
||||
asm("");
|
||||
}
|
||||
} else if (p->qSpeedAirX != 0) {
|
||||
res = sa2__sub_801F100(I(sp38), I(gPlayer.qWorldY) + p->spriteOffsetX, layer, -8, sa2__sub_801EB44);
|
||||
res = SA2_LABEL(sub_801F100)(I(sp38), I(gPlayer.qWorldY) + p->spriteOffsetX, layer, -8,
|
||||
SA2_LABEL(sub_801EB44));
|
||||
if (res < 0) {
|
||||
p->moveState &= ~4;
|
||||
temp_r0_16 = &p->character;
|
||||
@@ -618,7 +619,8 @@ block_23:
|
||||
p->qSpeedAirY = -Q(3.0);
|
||||
}
|
||||
} else if (p->qSpeedAirX != 0) {
|
||||
res = sa2__sub_801F100(sp38 >> 8, p->spriteOffsetX + I(gPlayer.qWorldY), layer, +8, sa2__sub_801EB44);
|
||||
res = SA2_LABEL(sub_801F100)(sp38 >> 8, p->spriteOffsetX + I(gPlayer.qWorldY), layer, +8,
|
||||
SA2_LABEL(sub_801EB44));
|
||||
if (res < 0) {
|
||||
temp_r1_10 = p->moveState & ~4;
|
||||
p->moveState = temp_r1_10;
|
||||
@@ -690,7 +692,7 @@ block_23:
|
||||
|
||||
if (sp34 == 0) {
|
||||
block_70:
|
||||
sa2__sub_8021BE0(&gPlayer);
|
||||
SA2_LABEL(sub_8021BE0)(&gPlayer);
|
||||
gPlayer.qSpeedGround = (u16)gPlayer.qSpeedAirX;
|
||||
gPlayer.rotation = 0;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ struct Task *CreateSpindashDustEffect()
|
||||
|
||||
void Task_SpindashDustEffect(void)
|
||||
{
|
||||
struct Camera *cam;
|
||||
Camera *cam;
|
||||
Player *p = &gPlayer;
|
||||
s32 offY;
|
||||
|
||||
@@ -110,7 +110,7 @@ void Task_SpindashDustEffect(void)
|
||||
|
||||
void Task_SpindashDustEffectBig(void)
|
||||
{
|
||||
struct Camera *cam;
|
||||
Camera *cam;
|
||||
Player *p = &gPlayer;
|
||||
s32 offY;
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ void Task_GrindEffect(void)
|
||||
#endif
|
||||
GrindEffect *spark = TASK_DATA(gCurTask);
|
||||
Sprite *s = &spark->s;
|
||||
struct Camera *cam = &gCamera;
|
||||
Camera *cam = &gCamera;
|
||||
s->x = I(p->qWorldX) - cam->x;
|
||||
s->y = (I(p->qWorldY) + p->spriteOffsetY) - cam->y;
|
||||
|
||||
|
||||
@@ -178,7 +178,7 @@ void Task_Item_Shield_Normal(void)
|
||||
s32 pid2;
|
||||
|
||||
ItemTask *item = TASK_DATA(gCurTask);
|
||||
struct Camera *cam = &gCamera;
|
||||
Camera *cam = &gCamera;
|
||||
Player *p;
|
||||
u32 itemEffect;
|
||||
#if (GAME == GAME_SA1) && !defined(NON_MATCHING)
|
||||
@@ -310,7 +310,7 @@ void Task_Item_Shield_Magnetic(void)
|
||||
s32 pid2;
|
||||
|
||||
ItemTask *item = TASK_DATA(gCurTask);
|
||||
struct Camera *cam = &gCamera;
|
||||
Camera *cam = &gCamera;
|
||||
Player *p;
|
||||
u32 itemEffect;
|
||||
#ifndef NON_MATCHING
|
||||
@@ -383,9 +383,9 @@ UNUSED void Task_802ABC8(void)
|
||||
// I'm not sure why tese were swapped :(
|
||||
#if (GAME == GAME_SA1)
|
||||
Sprite *s = &item->s;
|
||||
struct Camera *cam = &gCamera;
|
||||
Camera *cam = &gCamera;
|
||||
#else
|
||||
struct Camera *cam = &gCamera;
|
||||
Camera *cam = &gCamera;
|
||||
Sprite *s = &item->s;
|
||||
#endif
|
||||
s16 screenX, screenY;
|
||||
@@ -441,7 +441,7 @@ void Task_Item_Invincibility(void)
|
||||
s32 pid = ITEMTASK_GET_PLAYER_NUM();
|
||||
|
||||
ItemTask *item = TASK_DATA(gCurTask);
|
||||
struct Camera *cam = &gCamera;
|
||||
Camera *cam = &gCamera;
|
||||
s16 screenX, screenY;
|
||||
u32 priority;
|
||||
bool32 b;
|
||||
@@ -540,7 +540,7 @@ void Task_Item_Confusion(void)
|
||||
Sprite *s = &item->s;
|
||||
u32 b;
|
||||
|
||||
struct Camera *cam = &gCamera;
|
||||
Camera *cam = &gCamera;
|
||||
|
||||
if (IS_MULTI_PLAYER) {
|
||||
MultiplayerPlayer *mpp = TASK_DATA(gMultiplayerPlayerTasks[param]);
|
||||
|
||||
@@ -117,14 +117,14 @@ void Task_UpdateMpSpriteTaskSprite(void)
|
||||
}
|
||||
|
||||
{
|
||||
struct Camera *cam = &gCamera;
|
||||
Camera *cam = &gCamera;
|
||||
s->x = ts->x - cam->x;
|
||||
s->y = ts->y - cam->y;
|
||||
}
|
||||
} break;
|
||||
|
||||
case 1: {
|
||||
struct Camera *cam = &gCamera;
|
||||
Camera *cam = &gCamera;
|
||||
#if (GAME == GAME_SA1)
|
||||
s->x = ts->x - cam->SA2_LABEL(unk52);
|
||||
s->y = ts->y - cam->SA2_LABEL(unk54);
|
||||
|
||||
@@ -4826,7 +4826,7 @@ void Task_PlayerHandleDeath(void)
|
||||
}
|
||||
}
|
||||
|
||||
static inline bool32 DeadPlayerLeftScreen(Player *p, struct Camera *cam, s32 playerY)
|
||||
static inline bool32 DeadPlayerLeftScreen(Player *p, Camera *cam, s32 playerY)
|
||||
{
|
||||
if (p->moveState & MOVESTATE_80000000) {
|
||||
return FALSE;
|
||||
@@ -4948,7 +4948,7 @@ void Task_PlayerMain(void)
|
||||
#endif
|
||||
|
||||
if (p->moveState & MOVESTATE_DEAD) {
|
||||
struct Camera *cam = &gCamera;
|
||||
Camera *cam = &gCamera;
|
||||
gCurTask->main = Task_PlayerDied;
|
||||
p->charState = CHARSTATE_DEAD;
|
||||
p->qSpeedAirX = 0;
|
||||
@@ -6045,7 +6045,7 @@ void SA2_LABEL(sub_8024B10)(Player *p, PlayerSpriteInfo *inPsi)
|
||||
Sprite *s = &inPsi->s;
|
||||
PlayerSpriteInfo *psi = inPsi;
|
||||
|
||||
struct Camera *cam = &gCamera;
|
||||
Camera *cam = &gCamera;
|
||||
s16 camX = cam->x;
|
||||
s16 camY = cam->y;
|
||||
|
||||
@@ -6497,7 +6497,7 @@ void SA2_LABEL(sub_8024F74)(Player *p, PlayerSpriteInfo *inPsi)
|
||||
Sprite *s = &inPsi->s;
|
||||
PlayerSpriteInfo *psi = inPsi;
|
||||
|
||||
struct Camera *cam = &gCamera;
|
||||
Camera *cam = &gCamera;
|
||||
s16 camX = cam->x;
|
||||
s16 camY = cam->y;
|
||||
|
||||
@@ -9579,7 +9579,7 @@ void PlayerFn_Cmd_UpdateAirFallSpeed(Player *p) { PLAYERFN_UPDATE_AIR_FALL_SPEED
|
||||
|
||||
bool32 SA2_LABEL(sub_8029DE8)(Player *p)
|
||||
{
|
||||
struct Camera *cam = &gCamera;
|
||||
Camera *cam = &gCamera;
|
||||
s32 playerY = p->qWorldY;
|
||||
|
||||
#ifndef COLLECT_RINGS_ROM
|
||||
@@ -9615,7 +9615,7 @@ bool32 SA2_LABEL(sub_8029DE8)(Player *p)
|
||||
// Might've been an inline func, but doesn't match with it.
|
||||
UNUSED bool32 DeadPlayerLeftScreen_UnusedCopy(Player *p)
|
||||
{
|
||||
struct Camera *cam = &gCamera;
|
||||
Camera *cam = &gCamera;
|
||||
s32 playerY = p->qWorldY;
|
||||
|
||||
#ifndef COLLECT_RINGS_ROM
|
||||
|
||||
@@ -31,7 +31,7 @@ void Task_ScreenShake(void)
|
||||
TaskDestroy(gCurTask);
|
||||
return;
|
||||
} else {
|
||||
struct Camera *cam = &gCamera;
|
||||
Camera *cam = &gCamera;
|
||||
|
||||
if (shake->flags & SCREENSHAKE_RANDOM_VALUE) {
|
||||
factor = ((u32)(PseudoRandom32() << 15) >> 23) - 0xFF;
|
||||
@@ -89,7 +89,7 @@ static void TaskDestructor_ScreenShake(struct Task *t)
|
||||
{
|
||||
ScreenShake *shake = TASK_DATA(t);
|
||||
|
||||
struct Camera *cam = &gCamera;
|
||||
Camera *cam = &gCamera;
|
||||
|
||||
if (shake->flags & SCREENSHAKE_HORIZONTAL) {
|
||||
cam->shakeOffsetX = 0;
|
||||
|
||||
@@ -63,7 +63,7 @@ extern void CreateStageWaterTask(s32 waterLevel, u32 p1, u32 mask);
|
||||
extern struct Task *CreateMultiplayerChao(u8, u8);
|
||||
extern struct Task *sub_80550F8(void);
|
||||
// stage_ui_z.c
|
||||
typedef struct Struct_sub_80550F8 {
|
||||
typedef struct {
|
||||
u8 filler0[0x27];
|
||||
bool8 screenBlank;
|
||||
} Struct_sub_80550F8; /* size: 0x28 */
|
||||
|
||||
@@ -74,7 +74,7 @@ void Task_DrowningCountdown(void)
|
||||
|
||||
struct Task *SpawnDrowningCountdownNum(Player *p, s32 countdown)
|
||||
{
|
||||
struct Camera *cam = &gCamera;
|
||||
Camera *cam = &gCamera;
|
||||
struct Task *t = CreateMultiplayerSpriteTask(0, 0, 0, 0, Task_DrowningCountdown, TaskDestructor_MultiplayerSpriteTask);
|
||||
MultiplayerSpriteTask *ts = TASK_DATA(t);
|
||||
Sprite *s;
|
||||
@@ -207,7 +207,7 @@ static void Task_SpawnAirBubbles(void)
|
||||
|
||||
r1 += SIN((unk10 & 0xFF) * 4) >> 4;
|
||||
{
|
||||
struct Camera *cam = &gCamera;
|
||||
Camera *cam = &gCamera;
|
||||
transform->x = I(r1) - cam->x;
|
||||
transform->y = I(r4) - cam->y;
|
||||
}
|
||||
|
||||
@@ -218,7 +218,7 @@ void CreateStageWaterTask(s32 waterLevel, u32 p1, u32 mask)
|
||||
static void Task_StageWaterTask(void)
|
||||
{
|
||||
Water *water = &gWater;
|
||||
struct Camera *cam = &gCamera;
|
||||
Camera *cam = &gCamera;
|
||||
bool32 active;
|
||||
Sprite *s;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ typedef struct {
|
||||
Color *data;
|
||||
int width, height;
|
||||
} TextureBuffer;
|
||||
static TextureBuffer sDynTextureBuffer = { 0 };
|
||||
TextureBuffer sDynTextureBuffer = { 0 };
|
||||
|
||||
// TODO: This can be removed once full 32bit RGBA works
|
||||
static Background *sActiveBackgrounds[4] = { 0 };
|
||||
@@ -86,28 +86,28 @@ static void TempConvert4bppToRGBA8_DynTextureBuffer(const u8 *bitmap4bpp, int wi
|
||||
}
|
||||
}
|
||||
|
||||
typedef struct ChunkTileVertex {
|
||||
typedef struct {
|
||||
u8 x, y;
|
||||
} ChunkTileVertex;
|
||||
|
||||
typedef struct ChunkGfx {
|
||||
typedef struct {
|
||||
ChunkTileVertex *tileVerts;
|
||||
u8 *rgbaChunks;
|
||||
u16 count;
|
||||
u16 capacity;
|
||||
} ChunkGfx;
|
||||
|
||||
static ChunkGfx sChunkGfx = { 0 };
|
||||
ChunkGfx sChunkGfx = { 0 };
|
||||
#define RENDERED_CHUNKS_W ((DISPLAY_WIDTH / 96) + 2)
|
||||
#define RENDERED_CHUNKS_H ((DISPLAY_HEIGHT / 96) + 2)
|
||||
#define RENDERED_CHUNKS (RENDERED_CHUNKS_W * RENDERED_CHUNKS_H)
|
||||
|
||||
// Set of chunks that have to be drawn this frame
|
||||
typedef struct ChunkSet {
|
||||
typedef struct {
|
||||
MetatileIndexType *items;
|
||||
u16 count, capacity;
|
||||
} ChunkSet;
|
||||
static ChunkSet sChunkSet = { 0 };
|
||||
ChunkSet sChunkSet = { 0 };
|
||||
|
||||
// TODO: minY should be from upper-left corner, not bottom-left!
|
||||
void OpenGL_RenderRGBABuffer(Color *buffer, u16 bufferWidth, u16 bufferHeight, float minX, float minY, float maxX, float maxY)
|
||||
|
||||
Reference in new issue
Block a user