Skip to content

Commit a89ebd6

Browse files
committed
Rename GameplayReplay functions in more sane ways
i did this to confuse people and make them thing pausing was possible haha (it is though please dont tell them)
1 parent a1c69b4 commit a89ebd6

File tree

4 files changed

+22
-22
lines changed

4 files changed

+22
-22
lines changed

Themes/Til Death/BGAnimations/ScreenGameplay overlay/WifeJudgmentSpotting.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ local replaySlider =
689689
-- Change to onValueChangeEnd if this
690690
-- lags too much
691691
onValueChange = function(val)
692-
SCREENMAN:GetTopScreen():SetReplayPosition(val)
692+
SCREENMAN:GetTopScreen():SetSongPosition(val)
693693
end
694694
} or
695695
Def.Actor {}

Themes/Til Death/BGAnimations/ScreenGameplay overlay/replayscrolling.lua

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,25 +92,25 @@ scroller =
9292
end,
9393
ReplayScrollCommand = function(self)
9494
newpos = getNewSongPos()
95-
SCREENMAN:GetTopScreen():SetReplayPosition(newpos)
95+
SCREENMAN:GetTopScreen():SetSongPosition(newpos)
9696
end,
9797
ReplayRateCommand = function(self)
9898
newrate = getNewRate()
99-
givenrate = SCREENMAN:GetTopScreen():SetReplayRate(newrate)
99+
givenrate = SCREENMAN:GetTopScreen():SetRate(newrate)
100100
if givenrate ~= nil then
101101
realnewrate = notShit.round(givenrate, 3)
102102
--SCREENMAN:SystemMessage(string.format("Set rate to %f", realnewrate))
103103
end
104104
end,
105105
ReplayPauseToggleCommand = function(self)
106-
SCREENMAN:GetTopScreen():ToggleReplayPause()
106+
SCREENMAN:GetTopScreen():TogglePause()
107107
end,
108108
ReplayBookmarkSetCommand = function(self)
109109
position = SCREENMAN:GetTopScreen():GetSongPosition()
110-
SCREENMAN:GetTopScreen():SetReplayBookmark(position)
110+
SCREENMAN:GetTopScreen():SetBookmark(position)
111111
end,
112112
ReplayBookmarkGotoCommand = function(self)
113-
SCREENMAN:GetTopScreen():JumpToReplayBookmark()
113+
SCREENMAN:GetTopScreen():JumpToBookmark()
114114
end,
115115
}
116116
local span = 50
@@ -147,21 +147,21 @@ scroller[#scroller + 1] =
147147
button(
148148
"Pause",
149149
function(self)
150-
SCREENMAN:GetTopScreen():ToggleReplayPause()
150+
SCREENMAN:GetTopScreen():TogglePause()
151151
local paused = GAMESTATE:IsPaused()
152152
self.label.actor:settext(paused and "Play" or "Pause")
153153
end
154154
),
155155
button(
156156
"Fast Forward",
157157
function()
158-
SCREENMAN:GetTopScreen():SetReplayPosition(SCREENMAN:GetTopScreen():GetSongPosition() + 5)
158+
SCREENMAN:GetTopScreen():SetSongPosition(SCREENMAN:GetTopScreen():GetSongPosition() + 5)
159159
end
160160
),
161161
button(
162162
"Rewind",
163163
function()
164-
SCREENMAN:GetTopScreen():SetReplayPosition(SCREENMAN:GetTopScreen():GetSongPosition() - 5)
164+
SCREENMAN:GetTopScreen():SetSongPosition(SCREENMAN:GetTopScreen():GetSongPosition() - 5)
165165
end
166166
),
167167
}

src/Etterna/Screen/Gameplay/ScreenGameplayReplay.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ ScreenGameplayReplay::SetSongPosition(float newPositionSeconds)
384384
}
385385

386386
void
387-
ScreenGameplayReplay::ToggleReplayPause()
387+
ScreenGameplayReplay::TogglePause()
388388
{
389389
// True if we were paused before now
390390
bool oldPause = GAMESTATE->GetPaused();
@@ -529,14 +529,14 @@ ScreenGameplayReplay::ToggleReplayPause()
529529
class LunaScreenGameplayReplay : public Luna<ScreenGameplayReplay>
530530
{
531531
public:
532-
static int SetReplayPosition(T* p, lua_State* L)
532+
static int SetSongPosition(T* p, lua_State* L)
533533
{
534534
float newpos = FArg(1);
535535
if (GAMESTATE->GetPaused())
536536
p->SetSongPosition(newpos);
537537
return 0;
538538
}
539-
static int SetReplayRate(T* p, lua_State* L)
539+
static int SetRate(T* p, lua_State* L)
540540
{
541541
float newrate = FArg(1);
542542
if (!GAMESTATE->GetPaused()) {
@@ -546,18 +546,18 @@ class LunaScreenGameplayReplay : public Luna<ScreenGameplayReplay>
546546
lua_pushnumber(L, p->SetRate(newrate));
547547
return 1;
548548
}
549-
static int ToggleReplayPause(T* p, lua_State* L)
549+
static int TogglePause(T* p, lua_State* L)
550550
{
551-
p->ToggleReplayPause();
551+
p->TogglePause();
552552
return 0;
553553
}
554-
static int SetReplayBookmark(T* p, lua_State* L)
554+
static int SetBookmark(T* p, lua_State* L)
555555
{
556556
float position = FArg(1);
557557
p->m_fReplayBookmarkSeconds = position;
558558
return 0;
559559
}
560-
static int JumpToReplayBookmark(T* p, lua_State* L)
560+
static int JumpToBookmark(T* p, lua_State* L)
561561
{
562562
if (GAMESTATE->GetPaused()) {
563563
p->SetSongPosition(p->m_fReplayBookmarkSeconds);
@@ -568,11 +568,11 @@ class LunaScreenGameplayReplay : public Luna<ScreenGameplayReplay>
568568

569569
LunaScreenGameplayReplay()
570570
{
571-
ADD_METHOD(SetReplayPosition);
572-
ADD_METHOD(SetReplayRate);
573-
ADD_METHOD(ToggleReplayPause);
574-
ADD_METHOD(SetReplayBookmark);
575-
ADD_METHOD(JumpToReplayBookmark);
571+
ADD_METHOD(SetSongPosition);
572+
ADD_METHOD(SetRate);
573+
ADD_METHOD(TogglePause);
574+
ADD_METHOD(SetBookmark);
575+
ADD_METHOD(JumpToBookmark);
576576
}
577577
};
578578

src/Etterna/Screen/Gameplay/ScreenGameplayReplay.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class ScreenGameplayReplay : public ScreenGameplay
2525
// Move the current position of the song in the middle of gameplay
2626
void SetSongPosition(float newPositionSeconds);
2727
// Toggle pause
28-
void ToggleReplayPause();
28+
void TogglePause();
2929
float m_fReplayBookmarkSeconds;
3030

3131
protected:

0 commit comments

Comments
 (0)