Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CHLCC intro sequence #78

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ set(Impacto_Src
src/modelviewer.cpp
src/characterviewer.cpp
src/spriteanimation.cpp
src/pathanimation.cpp
src/background2d.cpp
src/mask2d.cpp
src/character2d.cpp
Expand Down Expand Up @@ -334,6 +335,7 @@ set(Impacto_Header
src/characterviewer.h
src/spritesheet.h
src/spriteanimation.h
src/pathanimation.h
src/font.h
src/background2d.h
src/mask2d.h
Expand Down
144 changes: 142 additions & 2 deletions profiles/chlcc/hud/titlemenu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,16 @@ root.TitleMenu = {
PressToStartAnimDurationIn = 0.5,
PressToStartAnimDurationOut = 0.5,
PressToStartSprite = "TitleMenuPressToStart",
IntroBackgroundSprite = "TitleMenuIntroBackground",
BackgroundSprite = "TitleMenuBackground",
IntroBackgroundSprite = "TitleMenuIntroBackground",
IntroBouncingStarSprite = "StarLogo",
IntroSmallStarSprite = "IntroSmallStar",
IntroExplodingStarAnimationDuration = 1.5,
IntroExplodingStarAnimationRotationDuration = 0.5,
IntroExplodingStarAnimationDistance = 315,
IntroPanningAnimationDuration = 2.1,
IntroAfterPanningWaitDuration = 0.8,
IntroBigStarSprite = "IntroBigStar",
DelusionADVUnderSprite = "DelusionADVUnder", -- "DelusionADVUnderEnglish" with the TLed assets, "DelusionADVUnder" with the original ones
DelusionADVUnderX = 78, --74 with the TLed assets, 78 with the original ones
DelusionADVUnderY = 394, --396 with the TLed assets, 394 with the original ones
Expand Down Expand Up @@ -101,7 +109,27 @@ root.TitleMenu = {
MenuEntriesSprites = {},
MenuEntriesHighlightedSprites = {},
LineNum = 6,
LineEntriesSprites = {}
LineEntriesSprites = {},
IntroStarBounceAnimationSegmentCount = 7
};

root.TitleMenu.IntroHighlightSprites = {
"IntroBrightGreenHighlight",
"IntroSunHighlight",
"IntroGrayHighlight",
"IntroCrescentRainbowHighlight",
"IntroBlueHighlight",
"IntroWhiteHighlight",
"IntroBrownHighlight",
"IntroDiamondHighlight",
"IntroDarkGreenHighlight",
"IntroCircularRainbowHighlight"
};

-- Positions along the diagonal normalized between -1 and 1
root.TitleMenu.IntroHighlightPositions = {
-1.13, -1.00, -0.49, 0.00, 0.17,
0.30, 0.58, 0.69, 0.91, 1.12
};

for i = 0, 3 do
Expand Down Expand Up @@ -241,6 +269,66 @@ root.Sprites["TitleMenuIntroBackground"] = {
Bounds = { X = 0, Y = 0, Width = 1280, Height = 720 },
};

root.Sprites["IntroSmallStar"] = {
Sheet = "Title",
Bounds = { X = 1153, Y = 534, Width = 45, Height = 44 },
};

root.Sprites["IntroBigStar"] = {
Sheet = "Title",
Bounds = { X = 1156, Y = 345, Width = 178, Height = 170 },
};

root.Sprites["IntroBrightGreenHighlight"] = {
Sheet = "Highlights",
Bounds = { X = 1536, Y = 0, Width = 256, Height = 256 },
};

root.Sprites["IntroSunHighlight"] = {
Sheet = "Highlights",
Bounds = { X = 0, Y = 0, Width = 512, Height = 512 },
};

root.Sprites["IntroGrayHighlight"] = {
Sheet = "Highlights",
Bounds = { X = 1536, Y = 256, Width = 256, Height = 256 },
};

root.Sprites["IntroCrescentRainbowHighlight"] = {
Sheet = "Highlights",
Bounds = { X = 0, Y = 512, Width = 512, Height = 512 },
};

root.Sprites["IntroBlueHighlight"] = {
Sheet = "Highlights",
Bounds = { X = 1280, Y = 256, Width = 256, Height = 256 },
};

root.Sprites["IntroWhiteHighlight"] = {
Sheet = "Highlights",
Bounds = { X = 1280, Y = 0, Width = 256, Height = 256 },
};

root.Sprites["IntroBrownHighlight"] = {
Sheet = "Highlights",
Bounds = { X = 1024, Y = 256, Width = 256, Height = 256 },
};

root.Sprites["IntroDiamondHighlight"] = {
Sheet = "Highlights",
Bounds = { X = 512, Y = 512, Width = 512, Height = 512 },
};

root.Sprites["IntroDarkGreenHighlight"] = {
Sheet = "Highlights",
Bounds = { X = 1024, Y = 0, Width = 256, Height = 256 },
};

root.Sprites["IntroCircularRainbowHighlight"] = {
Sheet = "Highlights",
Bounds = { X = 512, Y = 0, Width = 512, Height = 512 },
};

root.Sprites["TitleMenuBackground"] = {
Sheet = "TitleBg2",
Bounds = { X = 0, Y = 0, Width = 1280, Height = 720 },
Expand Down Expand Up @@ -312,3 +400,55 @@ root.Sprites["TitleMenuSecondaryItemHighlight"] = {
Sheet = "Title",
Bounds = { X = 915, Y = 989, Width = 285, Height = 34 },
};

root.TitleMenu.IntroStarBounceAnimationPath = {
{
StartPosition = { X = 1344, Y = 144 },
EndPosition = { X = 1152, Y = 576 },
Duration = 0.72,
EasingX = EasingFunction.Linear,
EasingY = EasingFunction.QuadraticIn,
},
{
StartPosition = { X = 1152, Y = 576 },
EndPosition = { X = 1050, Y = 504 },
Duration = 0.3,
EasingX = EasingFunction.Linear,
EasingY = EasingFunction.QuadraticOut,
},
{
StartPosition = { X = 1050, Y = 504 },
EndPosition = { X = 960, Y = 576 },
Duration = 0.3,
EasingX = EasingFunction.Linear,
EasingY = EasingFunction.QuadraticIn,
},
{
StartPosition = { X = 960, Y = 576 },
EndPosition = { X = 870, Y = 504 },
Duration = 0.3,
EasingX = EasingFunction.Linear,
EasingY = EasingFunction.QuadraticOut,
},
{
StartPosition = { X = 870, Y = 504 },
EndPosition = { X = 780, Y = 576 },
Duration = 0.3,
EasingX = EasingFunction.Linear,
EasingY = EasingFunction.QuadraticIn,
},
{
StartPosition = { X = 780, Y = 576 },
EndPosition = { X = 704, Y = 252 },
Duration = 0.66,
EasingX = EasingFunction.Linear,
EasingY = EasingFunction.QuadraticOut,
},
{
StartPosition = { X = 704, Y = 252 },
EndPosition = { X = 640, Y = 360 },
Duration = 0.4,
EasingX = EasingFunction.Linear,
EasingY = EasingFunction.QuadraticIn,
},
};
11 changes: 8 additions & 3 deletions profiles/chlcc/sprites.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ root.SpriteSheets = {
DesignHeight = 1024
},
["AlbumThumbnailSheet"] = {
Path = {Mount = "system", Id = 1 },
Path = { Mount = "system", Id = 1 },
DesignWidth = 2048,
DesignHeight = 1024
},
["AlbumThumbnailSheet2"] = {
Path = {Mount = "system", Id = 2 },
Path = { Mount = "system", Id = 2 },
DesignWidth = 2048,
DesignHeight = 1024
},
Expand All @@ -29,6 +29,11 @@ root.SpriteSheets = {
DesignWidth = 2048,
DesignHeight = 720
},
["Highlights"] = {
Path = { Mount = "system", Id = 7 },
DesignWidth = 2048,
DesignHeight = 1024
},
["Menu"] = {
Path = { Mount = "system", Id = 8 },
DesignWidth = 2048,
Expand Down Expand Up @@ -101,4 +106,4 @@ root.SpriteSheets = {
},
};

root.Sprites = {};
root.Sprites = {};
3 changes: 2 additions & 1 deletion src/audio/audiochannel.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class AudioChannel {
virtual void Stop(float fadeOutDuration){};

virtual void Pause() {
if (State == ACS_Playing) State = ACS_Paused;
if (State == ACS_Playing || State == ACS_FadingIn || State == ACS_FadingOut)
State = ACS_Paused;
};
virtual void Resume() {
if (State == ACS_Paused) State = ACS_Playing;
Expand Down
2 changes: 1 addition & 1 deletion src/audio/openal/audiochannel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ void AudioChannel::Stop(float fadeOutDuration) {
}

void AudioChannel::Pause() {
if (State == ACS_Playing) {
if (State == ACS_Playing || State == ACS_FadingIn || State == ACS_FadingOut) {
alSourcePause(Source);
State = ACS_Paused;
}
Expand Down
Loading