Skip to content

Commit

Permalink
don't stop now, the fun is only just getting started!!
Browse files Browse the repository at this point in the history
  • Loading branch information
Rubberduckycooly committed Aug 15, 2022
1 parent 2b023ba commit 82a83ea
Show file tree
Hide file tree
Showing 347 changed files with 1,311 additions and 1,317 deletions.
5 changes: 2 additions & 3 deletions SonicMania/Objects/AIZ/AIZEggRobo.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void AIZEggRobo_Update(void);
void AIZEggRobo_LateUpdate(void);
void AIZEggRobo_StaticUpdate(void);
void AIZEggRobo_Draw(void);
void AIZEggRobo_Create(void* data);
void AIZEggRobo_Create(void *data);
void AIZEggRobo_StageLoad(void);
#if RETRO_INCLUDE_EDITOR
void AIZEggRobo_EditorDraw(void);
Expand All @@ -45,5 +45,4 @@ void AIZEggRobo_Serialize(void);

// Extra Entity Functions


#endif //!OBJ_AIZEGGROBO_H
#endif //! OBJ_AIZEGGROBO_H
4 changes: 2 additions & 2 deletions SonicMania/Objects/AIZ/AIZEncoreTutorial.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void AIZEncoreTutorial_Update(void);
void AIZEncoreTutorial_LateUpdate(void);
void AIZEncoreTutorial_StaticUpdate(void);
void AIZEncoreTutorial_Draw(void);
void AIZEncoreTutorial_Create(void* data);
void AIZEncoreTutorial_Create(void *data);
void AIZEncoreTutorial_StageLoad(void);
#if RETRO_INCLUDE_EDITOR
void AIZEncoreTutorial_EditorDraw(void);
Expand All @@ -49,4 +49,4 @@ void AIZEncoreTutorial_State_ReturnToCutscene(void);

#endif

#endif //!OBJ_AIZENCORETUTORIAL_H
#endif //! OBJ_AIZENCORETUTORIAL_H
4 changes: 2 additions & 2 deletions SonicMania/Objects/AIZ/AIZKingClaw.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void AIZKingClaw_Update(void);
void AIZKingClaw_LateUpdate(void);
void AIZKingClaw_StaticUpdate(void);
void AIZKingClaw_Draw(void);
void AIZKingClaw_Create(void* data);
void AIZKingClaw_Create(void *data);
void AIZKingClaw_StageLoad(void);
#if RETRO_INCLUDE_EDITOR
void AIZKingClaw_EditorDraw(void);
Expand All @@ -50,4 +50,4 @@ void AIZKingClaw_Serialize(void);
void AIZKingClaw_HandleClawPositions(void);
void AIZKingClaw_State_Grab(void);

#endif //!OBJ_AIZKINGCLAW_H
#endif //! OBJ_AIZKINGCLAW_H
15 changes: 7 additions & 8 deletions SonicMania/Objects/AIZ/AIZRockPile.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ void AIZRockPile_Update(void)
int32 jumping = player->animator.animationID == ANI_JUMP;
int32 groundVel = player->groundVel;


if (self->smashSides || self->smashTop) {
int32 side = Player_CheckCollisionBox(player, self, hitbox);
if (self->smashSides && (side == C_LEFT || side == C_RIGHT)) {
Expand Down Expand Up @@ -136,7 +135,7 @@ void AIZRockPile_StageLoad(void)
{
AIZRockPile->aniFrames = RSDK.LoadSpriteAnimation("AIZ/Platform.bin", SCOPE_STAGE);

AIZRockPile->sfxBreak = RSDK.GetSfx("Stage/LedgeBreak3.wav");
AIZRockPile->sfxBreak = RSDK.GetSfx("Stage/LedgeBreak3.wav");
}

void AIZRockPile_SpawnRocks(int32 *speeds)
Expand All @@ -147,12 +146,12 @@ void AIZRockPile_SpawnRocks(int32 *speeds)
EntityDebris *debris = CREATE_ENTITY(Debris, Debris_State_Fall, self->position.x + self->rockPositions[2 * i],
self->position.y + self->rockPositions[(2 * i) + 1]);
RSDK.SetSpriteAnimation(AIZRockPile->aniFrames, 1, &debris->animator, true, 0);
debris->velocity.x = speeds[2 * i];
debris->velocity.y = speeds[(2 * i) + 1];
debris->drawGroup = Zone->objectDrawGroup[1];
debris->updateRange.x = 0x800000;
debris->updateRange.y = 0x800000;
debris->gravityStrength = 0x1800;
debris->velocity.x = speeds[2 * i];
debris->velocity.y = speeds[(2 * i) + 1];
debris->drawGroup = Zone->objectDrawGroup[1];
debris->updateRange.x = 0x800000;
debris->updateRange.y = 0x800000;
debris->gravityStrength = 0x1800;
}

RSDK.PlaySfx(AIZRockPile->sfxBreak, false, 255);
Expand Down
30 changes: 15 additions & 15 deletions SonicMania/Objects/AIZ/AIZSetup.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ void AIZSetup_StageLoad(void)

AIZSetup->hasSetupCutscene = false;

AIZSetup->aniTiles = RSDK.LoadSpriteSheet("AIZ/AniTiles.gif", SCOPE_STAGE);
AIZSetup->knuxFrames = RSDK.LoadSpriteAnimation("Players/KnuxCutsceneAIZ.bin", SCOPE_STAGE);
AIZSetup->aniTiles = RSDK.LoadSpriteSheet("AIZ/AniTiles.gif", SCOPE_STAGE);
AIZSetup->knuxFrames = RSDK.LoadSpriteAnimation("Players/KnuxCutsceneAIZ.bin", SCOPE_STAGE);

#if MANIA_USE_PLUS
if (RSDK.GetTileLayerID("Background 4") >= DRAWGROUP_COUNT) {
Expand Down Expand Up @@ -158,8 +158,8 @@ void AIZSetup_StageLoad(void)
else
pos = 0;

int32 angle = 0;
int32 deform = RSDK.Rand(0, 4);
int32 angle = 0;
int32 deform = RSDK.Rand(0, 4);
for (int32 i = 0; i < 16; ++i) {
deformData[pos + i] = (deform * RSDK.Sin1024(angle)) >> 10;
deformData[(pos + 0x200) + i] = (deform * RSDK.Sin1024(angle)) >> 10;
Expand Down Expand Up @@ -207,10 +207,10 @@ void AIZSetup_StageLoad(void)
BGSwitch->switchCallback[AIZ_BG_JUNGLE] = AIZSetup_BGSwitch_Jungle;
BGSwitch->switchCallback[AIZ_BG_SKY] = AIZSetup_BGSwitch_Sky;

BGSwitch->layerIDs[0] = AIZ_BG_JUNGLE;
BGSwitch->layerIDs[1] = AIZ_BG_JUNGLE;
BGSwitch->layerIDs[2] = AIZ_BG_JUNGLE;
BGSwitch->layerIDs[3] = AIZ_BG_JUNGLE;
BGSwitch->layerIDs[0] = AIZ_BG_JUNGLE;
BGSwitch->layerIDs[1] = AIZ_BG_JUNGLE;
BGSwitch->layerIDs[2] = AIZ_BG_JUNGLE;
BGSwitch->layerIDs[3] = AIZ_BG_JUNGLE;

RSDK.SetDrawGroupProperties(0, false, Water_DrawHook_ApplyWaterPalette);
RSDK.SetDrawGroupProperties(Zone->hudDrawGroup, false, Water_DrawHook_RemoveWaterPalette);
Expand Down Expand Up @@ -245,9 +245,9 @@ void AIZSetup_PlayerState_Static(void)
void AIZSetup_PlayerState_P2Enter(void)
{
RSDK_THIS(Player);
self->active = ACTIVE_NORMAL;
self->visible = true;
self->stateInput = Player_Input_P2_AI;
self->active = ACTIVE_NORMAL;
self->visible = true;
self->stateInput = Player_Input_P2_AI;
Player->respawnTimer = 240;
Player_HandleSidekickRespawn();
}
Expand All @@ -256,7 +256,7 @@ void AIZSetup_HandleHeavyMovement(void)
{
EntityAIZKingClaw *claw = AIZSetup->claw;

int32 x = -0x10000;
int32 x = -0x10000;
foreach_all(AIZEggRobo, robo)
{
if (robo->forKnux && x >= robo->position.x)
Expand Down Expand Up @@ -558,10 +558,10 @@ bool32 AIZSetup_CutsceneSonic_RubyGrabbed(EntityCutsceneSeq *host)
}
}
else {
AIZSetup->playDrillSfx = false;
AIZSetup->playDrillSfx = false;

host->storedTimer = host->timer;
host->storedValue = claw->position.y;
host->storedTimer = host->timer;
host->storedValue = claw->position.y;

AIZSetup->decorations[0]->rotSpeed = 0;
AIZSetup->decorations[1]->rotSpeed = 0;
Expand Down
2 changes: 1 addition & 1 deletion SonicMania/Objects/AIZ/Bloominator.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ void Bloominator_State_Init(void)
self->active = ACTIVE_NORMAL;
self->timer = 0;

self->state = Bloominator_State_Idle;
self->state = Bloominator_State_Idle;
Bloominator_State_Idle();
}

Expand Down
20 changes: 10 additions & 10 deletions SonicMania/Objects/AIZ/MonkeyDude.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,25 +110,25 @@ void MonkeyDude_Create(void *data)
void MonkeyDude_StageLoad(void)
{
#if MANIA_USE_PLUS
MonkeyDude->aniFrames = RSDK.LoadSpriteAnimation("AIZ/MonkeyDude.bin", SCOPE_STAGE);
MonkeyDude->aniFrames = RSDK.LoadSpriteAnimation("AIZ/MonkeyDude.bin", SCOPE_STAGE);

MonkeyDude->hitboxBadnik.left = -10;
MonkeyDude->hitboxBadnik.top = -21;
MonkeyDude->hitboxBadnik.right = 7;
MonkeyDude->hitboxBadnik.bottom = 4;
MonkeyDude->hitboxBadnik.left = -10;
MonkeyDude->hitboxBadnik.top = -21;
MonkeyDude->hitboxBadnik.right = 7;
MonkeyDude->hitboxBadnik.bottom = 4;

MonkeyDude->hitboxCoconut.left = -4;
MonkeyDude->hitboxCoconut.top = -4;
MonkeyDude->hitboxCoconut.right = 4;
MonkeyDude->hitboxCoconut.bottom = 4;
#else
MonkeyDude->aniFrames = RSDK.LoadSpriteAnimation("Blueprint/MonkeyDude.bin", SCOPE_STAGE);
MonkeyDude->aniFrames = RSDK.LoadSpriteAnimation("Blueprint/MonkeyDude.bin", SCOPE_STAGE);

// strange hitbox, doesn't match either one above lol
MonkeyDude->hitboxBadnik.left = -8;
MonkeyDude->hitboxBadnik.top = -8;
MonkeyDude->hitboxBadnik.right = 8;
MonkeyDude->hitboxBadnik.bottom = 8;
MonkeyDude->hitboxBadnik.left = -8;
MonkeyDude->hitboxBadnik.top = -8;
MonkeyDude->hitboxBadnik.right = 8;
MonkeyDude->hitboxBadnik.bottom = 8;
#endif

RSDK.SetSpriteAnimation(MonkeyDude->aniFrames, 2, &MonkeyDude->armAnimator, true, 0);
Expand Down
4 changes: 2 additions & 2 deletions SonicMania/Objects/AIZ/SchrodingersCapsule.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ void SchrodingersCapsule_State_Explode(void)
RSDK.SetSpriteAnimation(-1, -1, &self->rayAnimator, true, 0);

EntityPlayer *buddy1 = RSDK_GET_ENTITY(SLOT_PLAYER3, Player);
buddy1->classID = Player->classID;
buddy1->classID = Player->classID;
Player_ChangeCharacter(buddy1, ID_MIGHTY);
buddy1->position.x = self->position.x + 0xE0000;
buddy1->position.y = self->position.y;
Expand All @@ -239,7 +239,7 @@ void SchrodingersCapsule_State_Explode(void)
RSDK.SetSpriteAnimation(buddy1->aniFrames, ANI_HURT, &buddy1->animator, true, 0);

EntityPlayer *buddy2 = RSDK_GET_ENTITY(SLOT_PLAYER4, Player);
buddy2->classID = Player->classID;
buddy2->classID = Player->classID;
Player_ChangeCharacter(buddy2, ID_RAY);
buddy2->position.x = self->position.x - 0xE0000;
buddy2->position.y = self->position.y;
Expand Down
4 changes: 2 additions & 2 deletions SonicMania/Objects/BSS/BSS_Message.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ void BSS_Message_State_GetBSWait(void)

if (!setup->speedupLevel) {
if (player->up) {
setup->speedupLevel = 16;
setup->speedupLevel = 16;
setup->globeSpeed = 16;
setup->globeSpeedInc = 2;

Expand All @@ -128,7 +128,7 @@ void BSS_Message_State_GetBSWait(void)
if (++self->timer >= 180) {
self->timer = 0;

setup->speedupLevel = 16;
setup->speedupLevel = 16;
setup->globeSpeed = 16;
setup->globeSpeedInc = 2;

Expand Down
10 changes: 5 additions & 5 deletions SonicMania/Objects/BSS/BSS_Setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,9 +439,9 @@ void BSS_Setup_State_GlobeJettison(void)
BSS_Setup_LaunchSpheres();

if (++self->spinTimer == 128) {
self->spinTimer = 0;
self->speedupLevel = 8;
self->globeSpeed = 8;
self->spinTimer = 0;
self->speedupLevel = 8;
self->globeSpeed = 8;
BSS_Setup_SetupFinishSequence();

EntityBSS_Player *player = RSDK_GET_ENTITY(SLOT_PLAYER1, BSS_Player);
Expand Down Expand Up @@ -770,7 +770,7 @@ void BSS_Setup_HandleCollectableMovement(void)
}
else {
collectable->classID = BSS_Collectable->classID;
collectable->type = tile & 0x3FF;
collectable->type = tile & 0x3FF;
if (y < 112) {
self->xMultiplier = BSS_Setup->xMultiplierTable[y];
self->divisor = BSS_Setup->divisorTable[y];
Expand Down Expand Up @@ -928,7 +928,7 @@ void BSS_Setup_State_GlobeExit(void)
RSDK_THIS(BSS_Setup);

PauseMenu->disableEvents = true;
self->speedupLevel = 0;
self->speedupLevel = 0;

if (self->spinTimer <= 0) {
CREATE_ENTITY(BSS_Message, INT_TO_VOID(BSS_MESSAGE_FINISHED), self->position.x, self->position.y);
Expand Down
4 changes: 2 additions & 2 deletions SonicMania/Objects/CPZ/CPZ1Intro.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void CPZ1Intro_Update(void);
void CPZ1Intro_LateUpdate(void);
void CPZ1Intro_StaticUpdate(void);
void CPZ1Intro_Draw(void);
void CPZ1Intro_Create(void* data);
void CPZ1Intro_Create(void *data);
void CPZ1Intro_StageLoad(void);
#if RETRO_INCLUDE_EDITOR
void CPZ1Intro_EditorDraw(void);
Expand All @@ -56,4 +56,4 @@ bool32 CPZ1Intro_Cutscene_ChemicalDrop(EntityCutsceneSeq *host);
bool32 CPZ1Intro_Cutscene_PlayerChemicalReact(EntityCutsceneSeq *host);
bool32 CPZ1Intro_Cutscene_ReadyStage(EntityCutsceneSeq *host);

#endif //!OBJ_CPZ1INTRO_H
#endif //! OBJ_CPZ1INTRO_H
4 changes: 2 additions & 2 deletions SonicMania/Objects/CPZ/CPZ2Outro.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ void CPZ2Outro_Update(void);
void CPZ2Outro_LateUpdate(void);
void CPZ2Outro_StaticUpdate(void);
void CPZ2Outro_Draw(void);
void CPZ2Outro_Create(void* data);
void CPZ2Outro_Create(void *data);
void CPZ2Outro_StageLoad(void);
#if RETRO_INCLUDE_EDITOR
void CPZ2Outro_EditorDraw(void);
Expand All @@ -35,4 +35,4 @@ void CPZ2Outro_Serialize(void);
void CPZ2Outro_SetupCutscene(void);
bool32 CPZ2Outro_Cutscene_Outro(EntityCutsceneSeq *host);

#endif //!OBJ_CPZ2OUTRO_H
#endif //! OBJ_CPZ2OUTRO_H
5 changes: 1 addition & 4 deletions SonicMania/Objects/CPZ/CPZBoss.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,7 @@ void CPZBoss_State_SetupArena(void)
EntityCPZBoss *target = RSDK_GET_ENTITY(SceneInfo->entitySlot + 1, CPZBoss);
Camera_SetupLerp(CAMERA_LERP_SIN1024_2, 0, target->position.x, target->position.y, 8);

foreach_active(HUD, hud)
{
CPZBoss->hudSlotID = RSDK.GetEntitySlot(hud);
}
foreach_active(HUD, hud) { CPZBoss->hudSlotID = RSDK.GetEntitySlot(hud); }

HUD_MoveOut();

Expand Down
8 changes: 4 additions & 4 deletions SonicMania/Objects/CPZ/CPZBoss.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
typedef enum {
CPZBOSS_PLAYER,
CPZBOSS_EGGMAN,
}CPZBossTypes;
} CPZBossTypes;

// Object Class
struct ObjectCPZBoss {
RSDK_OBJECT
Hitbox hitboxPlayerTrigger;
EntityPuyoMatch* managers[2];
EntityPuyoMatch *managers[2];
uint16 hudSlotID;
uint16 aniFrames;
uint16 playerFrames;
Expand Down Expand Up @@ -40,7 +40,7 @@ void CPZBoss_Update(void);
void CPZBoss_LateUpdate(void);
void CPZBoss_StaticUpdate(void);
void CPZBoss_Draw(void);
void CPZBoss_Create(void* data);
void CPZBoss_Create(void *data);
void CPZBoss_StageLoad(void);
#if RETRO_INCLUDE_EDITOR
void CPZBoss_EditorDraw(void);
Expand Down Expand Up @@ -71,4 +71,4 @@ void CPZBoss_State_EggmanFall(void);
void CPZBoss_State_PlayerExit(void);
void CPZBoss_State_Destroyed(void);

#endif //!OBJ_CPZBOSS_H
#endif //! OBJ_CPZBOSS_H
33 changes: 17 additions & 16 deletions SonicMania/Objects/CPZ/DNARiser.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,24 +66,24 @@ void DNARiser_Create(void *data)

void DNARiser_StageLoad(void)
{
DNARiser->aniFrames = RSDK.LoadSpriteAnimation("CPZ/DNARiser.bin", SCOPE_STAGE);
DNARiser->aniFrames = RSDK.LoadSpriteAnimation("CPZ/DNARiser.bin", SCOPE_STAGE);

DNARiser->hitbox.top = -16;
DNARiser->hitbox.bottom = 16;
DNARiser->hitbox.left = -16;
DNARiser->hitbox.right = 16;

DNARiser->active = ACTIVE_ALWAYS;

DNARiser->sfxBurst = RSDK.GetSfx("CPZ/DNABurst.wav");
DNARiser->sfxGrab = RSDK.GetSfx("CPZ/DNAGrab.wav");
DNARiser->sfxScan = RSDK.GetSfx("CPZ/DNAScan.wav");
DNARiser->sfxTiny[0] = RSDK.GetSfx("CPZ/DNATiny0.wav");
DNARiser->sfxTiny[1] = RSDK.GetSfx("CPZ/DNATiny1.wav");
DNARiser->sfxTiny[2] = RSDK.GetSfx("CPZ/DNATiny2.wav");
DNARiser->sfxTiny[3] = RSDK.GetSfx("CPZ/DNATiny3.wav");
DNARiser->sfxTiny[4] = RSDK.GetSfx("CPZ/DNATiny4.wav");
DNARiser->sfxTiny[5] = RSDK.GetSfx("CPZ/DNATiny5.wav");
DNARiser->active = ACTIVE_ALWAYS;

DNARiser->sfxBurst = RSDK.GetSfx("CPZ/DNABurst.wav");
DNARiser->sfxGrab = RSDK.GetSfx("CPZ/DNAGrab.wav");
DNARiser->sfxScan = RSDK.GetSfx("CPZ/DNAScan.wav");
DNARiser->sfxTiny[0] = RSDK.GetSfx("CPZ/DNATiny0.wav");
DNARiser->sfxTiny[1] = RSDK.GetSfx("CPZ/DNATiny1.wav");
DNARiser->sfxTiny[2] = RSDK.GetSfx("CPZ/DNATiny2.wav");
DNARiser->sfxTiny[3] = RSDK.GetSfx("CPZ/DNATiny3.wav");
DNARiser->sfxTiny[4] = RSDK.GetSfx("CPZ/DNATiny4.wav");
DNARiser->sfxTiny[5] = RSDK.GetSfx("CPZ/DNATiny5.wav");
}

void DNARiser_State_BubbleBurst(void)
Expand Down Expand Up @@ -403,8 +403,9 @@ void DNARiser_State_OrbSetup(void)
self->state = DNARiser_State_OrbIdle;
}

void DNARiser_State_OrbIdle(void) {
// 20220614 rdc said i could come back and comment these >:]
void DNARiser_State_OrbIdle(void)
{
// 20220614 rdc said i could come back and comment these >:]
}

void DNARiser_State_OrbFall(void)
Expand Down Expand Up @@ -595,8 +596,8 @@ void DNARiser_Draw_Helix(void)
for (int32 i = 0; i < 8; ++i) {
bool32 isYellowSmall = (isYellowBig && i <= 3) || (!isYellowBig && i >= 4);
bool32 canDraw = SceneInfo->currentDrawGroup == Zone->objectDrawGroup[1]
? ((isYellowBig && !isYellowSmall) || (!isYellowBig && isYellowSmall))
: ((isYellowBig && isYellowSmall) || (!isYellowBig && !isYellowSmall));
? ((isYellowBig && !isYellowSmall) || (!isYellowBig && isYellowSmall))
: ((isYellowBig && isYellowSmall) || (!isYellowBig && !isYellowSmall));

if (drawFlags[i] && canDraw) {
if (!isYellowSmall)
Expand Down
Loading

0 comments on commit 82a83ea

Please sign in to comment.