Skip to content

Commit

Permalink
Adderess comment
Browse files Browse the repository at this point in the history
  • Loading branch information
JaceCear committed Jan 5, 2025
1 parent e5225f6 commit 4e6608e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 8 deletions.
8 changes: 6 additions & 2 deletions include/constants/vram_hardcoded.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
#ifndef GUARD_VRAM_HARDCODED_H
#define GUARD_VRAM_HARDCODED_H

#if (ENGINE == ENGINE_SA1)
#if (GAME == GAME_SA1)
#define VRAM_RESERVED_DUST_EFFECT_BRAKING ((void *)OBJ_VRAM0 + 0x2100)
#elif (ENGINE == ENGINE_SA2)
#define VRAM_RESERVED_BUBBLES_SMALL (void *)(OBJ_VRAM0 + 0x2A20)
#define VRAM_RESERVED_BUBBLES_GROUP (void *)(OBJ_VRAM0 + 0x2AA0)
#elif (GAME == GAME_SA2)
#define VRAM_RESERVED_DUST_EFFECT_BRAKING ((void *)OBJ_VRAM0 + 0x2300)
#define VRAM_RESERVED_BUBBLES_SMALL (void *)(OBJ_VRAM0 + 0x2A40)
#define VRAM_RESERVED_BUBBLES_GROUP (void *)(OBJ_VRAM0 + 0x2AC0)
#endif

#endif // GUARD_VRAM_HARDCODED_H
19 changes: 14 additions & 5 deletions include/game/sa1_sa2_shared/camera.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,17 @@ typedef void (*BgUpdate)(s32, s32);

#define CAM_MODE_SPECTATOR 4

// NOTE: This was copy-pasted from SA2.
// There are type differences for members
struct Camera {
/* 0x00 */ s32 x;
/* 0x04 */ s32 y;
/* 0x00|0x04 */ CamCoord x;
/* 0x02|0x04 */ CamCoord y;
#if (GAME == GAME_SA1)
u8 filler4[0x2C];
/* 0x30 */ struct Task *movementTask;
/* 0x34 */ s16 shakeOffsetX;
/* 0x36 */ s16 shakeOffsetY;
#elif (GAME == GAME_SA2)
/* 0x08 */ s32 unk8;
/* 0x0C */ s32 unkC;
/* 0x10 */ s32 unk10;
Expand Down Expand Up @@ -54,11 +62,12 @@ struct Camera {
/* 0x56 */ s16 unk56;
/* 0x58 */ BgUpdate fnBgUpdate;
/* 0x5C */ struct Task *movementTask;
/* 0x60 */ s16 unk60;
/* 0x62 */ s16 unk62;
/* 0x60 */ s16 shakeOffsetX;
/* 0x62 */ s16 shakeOffsetY;
/* 0x64 */ s16 unk64;
/* 0x66 */ u8 spectatorTarget;
}; /* size 0x80 */
#endif
}; /* size 0x80(in SA2) */

extern struct Camera gCamera;

Expand Down
5 changes: 4 additions & 1 deletion include/game/water_effects.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@ typedef struct {
u16 pal[32][16];
} WaterData;

// Seems to be belonging to water effect
typedef struct {
#if (GAME == GAME_SA1)
/* 0x00*/ u8 filler0[2];
#elif (GAME == GAME_SA2)
/* 0x00 */ bool8 isActive;
/* 0x01 */ u8 unk1;
/* 0x02 */ u8 unk2;
/* 0x03 */ u8 unk3;
#endif
/* 0x04 */ s16 currentWaterLevel;
/* 0x06 */ s16 targetWaterLevel;
/* 0x08 */ u32 unk8;
Expand Down

0 comments on commit 4e6608e

Please sign in to comment.