Skip to content

Commit

Permalink
"Covered by" text in-game
Browse files Browse the repository at this point in the history
  • Loading branch information
lunalawl committed Feb 7, 2025
1 parent 1c0c903 commit a911659
Showing 1 changed file with 170 additions and 21 deletions.
191 changes: 170 additions & 21 deletions _qb/guitar/guitar_intro.q
Original file line number Diff line number Diff line change
Expand Up @@ -110,36 +110,143 @@ dx_immediate_sequence_props = {
hud_start_time = 0
hud_move_time = 0
}

song_covers_wavegroup = {
slowride
blacksunshine
cliffsofdover
holidayincambodia
storyofmylife
shebangsadrum
}

song_covers_steve = {
barracuda
citiesonflame
hitmewithyourbestshot
mississippiqueen
rockulikeahurricane
schoolsout
talkdirtytome
}

song_covers_line6 = {
blackmagicwoman
lagrange
paranoid
pridenjoy
rocknrollallnite
theseeker
sunshineofyourlove
}

script get_song_covered_by \{song = invalid}
if StructureContains structure = $gh3_songlist_props <song>
if StructureContains structure = ($gh3_songlist_props.<song>) covered_by
return covered_by = ($gh3_songlist_props.<song>.covered_by) TRUE
elseif StructureContains structure = $song_covers_wavegroup <song>
return covered_by = "WaveGroup" TRUE
elseif StructureContains structure = $song_covers_steve <song>
return covered_by = "Steve Ouimette" TRUE
elseif StructureContains structure = $song_covers_line6 <song>
return covered_by = "Line 6" TRUE
else
return \{FALSE}
endif
endif
printstruct <...>
scriptassert \{"Song not found"}
endscript

i_covered_by_text = "COVERED BY"

script intro_song_info
begin
GetSongTimeMS
if ($current_intro.song_title_start_time + $current_starttime < <Time>)
getsongtimems
if ($current_intro.song_title_start_time + $current_starttime < <time>)
break
endif
Wait \{1
GameFrame}
wait \{1
gameframe}
repeat
if ($current_intro.song_title_on_time = 0)
return
endif
get_song_title Song = ($current_song)
GetUpperCaseString <Song_Title>
intro_song_info_text :SetProps Text = <UpperCaseString>
get_song_title song = ($current_song)
GetUpperCaseString <song_title>
intro_song_info_text :setprops text = <uppercasestring>
intro_song_info_text :DoMorph Pos = ($current_intro.song_title_pos)
get_song_artist Song = ($current_song)
get_song_artist song = ($current_song)
GetUpperCaseString <song_artist>
intro_artist_info_text :SetProps Text = <UpperCaseString>
intro_artist_info_text :setprops text = <uppercasestring>
intro_artist_info_text :DoMorph Pos = ($current_intro.song_artist_pos)
get_song_artist_text Song = ($current_song)
get_song_artist_text song = ($current_song)
GetUpperCaseString <song_artist_text>
intro_performed_by_text :SetProps Text = <UpperCaseString>
intro_performed_by_text :setprops text = <uppercasestring>
intro_performed_by_text :DoMorph Pos = ($current_intro.performed_by_pos)
intro_song_info_text :SetProps \{z_priority = 5.0}
intro_artist_info_text :SetProps \{z_priority = 5.0}
intro_performed_by_text :SetProps \{z_priority = 5.0}
DoScreenElementMorph Id = intro_song_info_text Alpha = 1 Time = ($current_intro.song_title_fade_time / 1000.0)
DoScreenElementMorph Id = intro_performed_by_text Alpha = 1 Time = ($current_intro.song_title_fade_time / 1000.0)
DoScreenElementMorph Id = intro_artist_info_text Alpha = 1 Time = ($current_intro.song_title_fade_time / 1000.0)
get_song_covered_by song = ($current_song)
if GotParam \{covered_by}
GetUpperCaseString <covered_by>
CreateScreenElement \{type = TextElement
parent = root_window
id = intro_covered_by_text
font = text_a10
just = [
left
top
]
Scale = (1.0, 0.5)
rgba = [
230
205
160
255
]
text = $i_covered_by_text
z_priority = 5.0
alpha = 0
shadow
shadow_offs = (1.0, 1.0)}
CreateScreenElement \{type = TextElement
parent = root_window
id = intro_covered_by
font = text_a10
just = [
left
top
]
Scale = 1.0
rgba = [
255
190
70
255
]
text = "Coverer"
z_priority = 5.0
alpha = 0
shadow
shadow_offs = (1.0, 1.0)}
GetGlobalTags \{user_options}
if (<song_title> = 1)
intro_covered_by_text :DoMorph Pos = ((255.0, 165.0))
intro_covered_by :DoMorph Pos = ((255.0, 188.0))
else
intro_covered_by_text :DoMorph Pos = ((255.0, 200.0))
intro_covered_by :DoMorph Pos = ((255.0, 215.0))
endif
intro_covered_by :setprops text = <uppercasestring>
endif
intro_song_info_text :setprops \{z_priority = 5.0}
intro_artist_info_text :setprops \{z_priority = 5.0}
intro_performed_by_text :setprops \{z_priority = 5.0}
DoScreenElementMorph id = intro_song_info_text alpha = 1 time = ($current_intro.song_title_fade_time / 1000.0)
DoScreenElementMorph id = intro_performed_by_text alpha = 1 time = ($current_intro.song_title_fade_time / 1000.0)
DoScreenElementMorph id = intro_artist_info_text alpha = 1 time = ($current_intro.song_title_fade_time / 1000.0)
if GotParam \{covered_by}
DoScreenElementMorph id = intro_covered_by_text alpha = 1 time = ($current_intro.song_title_fade_time / 1000.0)
DoScreenElementMorph id = intro_covered_by alpha = 1 time = ($current_intro.song_title_fade_time / 1000.0)
endif
GetGlobalTags \{user_options}
if (<song_title> = 1)
intro_song_scale = 1.23
Expand All @@ -148,14 +255,56 @@ script intro_song_info
intro_song_info_text :SetProps Scale = (<intro_song_scale> - 0.43)
intro_performed_by_text :SetProps Scale = (<intro_performed_scale> - 0.43)
intro_artist_info_text :SetProps Scale = (<intro_artist_scale> - 0.43)
if GotParam \{covered_by}
intro_covered_by_text :SetProps Scale = (<intro_performed_scale> - 0.43)
intro_covered_by :SetProps Scale = (<intro_artist_scale> - 0.43)
endif
return
else
intro_song_info_text :SetProps Scale = 1.23
intro_performed_by_text :SetProps Scale = (1.0, 0.5)
intro_artist_info_text :SetProps Scale = 1.0
if GotParam \{covered_by}
intro_covered_by_text :SetProps Scale = (1.0, 0.5)
intro_covered_by :SetProps Scale = 1.0
endif
endif
wait ($current_intro.song_title_on_time / 1000.0) seconds
DoScreenElementMorph id = intro_song_info_text alpha = 0 time = ($current_intro.song_title_fade_time / 1000.0)
DoScreenElementMorph id = intro_artist_info_text alpha = 0 time = ($current_intro.song_title_fade_time / 1000.0)
DoScreenElementMorph id = intro_performed_by_text alpha = 0 time = ($current_intro.song_title_fade_time / 1000.0)
if GotParam \{covered_by}
DoScreenElementMorph id = intro_covered_by_text alpha = 0 time = ($current_intro.song_title_fade_time / 1000.0)
DoScreenElementMorph id = intro_covered_by alpha = 0 time = ($current_intro.song_title_fade_time / 1000.0)
wait ($current_intro.song_title_fade_time / 1000.0) seconds
DestroyScreenElement \{id = intro_covered_by_text}
DestroyScreenElement \{id = intro_covered_by}
endif
endscript

script destroy_intro
KillSpawnedScript \{id = intro_scripts}
KillSpawnedScript \{name = Song_Intro_Kick_SFX_Waiting}
KillSpawnedScript \{name = Song_Intro_Highway_Up_SFX_Waiting}
KillSpawnedScript \{name = move_highway_2d}
KillSpawnedScript \{name = intro_buttonup_ripple}
KillSpawnedScript \{name = intro_hud_move}
DoScreenElementMorph \{id = intro_song_info_text
alpha = 0}
DoScreenElementMorph \{id = intro_artist_info_text
alpha = 0}
DoScreenElementMorph \{id = intro_performed_by_text
alpha = 0}
if ScreenElementExists \{id = intro_covered_by}
DestroyScreenElement \{id = intro_covered_by}
endif
if ScreenElementExists \{id = intro_covered_by_text}
DestroyScreenElement \{id = intro_covered_by_text}
endif
Wait ($current_intro.song_title_on_time / 1000.0) Seconds
DoScreenElementMorph Id = intro_song_info_text Alpha = 0 Time = ($current_intro.song_title_fade_time / 1000.0)
DoScreenElementMorph Id = intro_artist_info_text Alpha = 0 Time = ($current_intro.song_title_fade_time / 1000.0)
DoScreenElementMorph Id = intro_performed_by_text Alpha = 0 Time = ($current_intro.song_title_fade_time / 1000.0)
player = 1
begin
FormatText checksumname = player_status 'player%i_status' i = <player> addtostringlookup
EnableInput controller = ($<player_status>.controller)
player = (<player> + 1)
repeat $current_num_players
endscript

0 comments on commit a911659

Please sign in to comment.